Skip to content

Commit

Permalink
Merge pull request #50 from fluttercommunity/rename-package
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy authored Nov 18, 2023
2 parents 9a7a82a + d48a99f commit aab2b6b
Show file tree
Hide file tree
Showing 8,448 changed files with 371 additions and 416 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ arcgis_webpack/node_modules
build/

# Android related
arcgis_map_android/android/**/gradle-wrapper.jar
arcgis_map_android/android/.gradle
arcgis_map_android/android/captures/
arcgis_map_android/android/gradlew
arcgis_map_android/android/gradlew.bat
arcgis_map_android/android/local.properties
arcgis_map_android/android/**/GeneratedPluginRegistrant.java
arcgis_map_sdk_android/android/**/gradle-wrapper.jar
arcgis_map_sdk_android/android/.gradle
arcgis_map_sdk_android/android/captures/
arcgis_map_sdk_android/android/gradlew
arcgis_map_sdk_android/android/gradlew.bat
arcgis_map_sdk_android/android/local.properties
arcgis_map_sdk_android/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
2 changes: 1 addition & 1 deletion am_sidekick/lib/am_sidekick.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ArcgisMapProject afProject = ArcgisMapProject(SidekickContext.projectRoot);

Future<void> runAm(List<String> args) async {
final runner = initializeSidekick(
mainProjectPath: 'arcgis_map',
mainProjectPath: 'arcgis_map_sdk',
flutterSdkPath: systemFlutterSdkPath(),
);

Expand Down
34 changes: 11 additions & 23 deletions am_sidekick/lib/src/arcgis_map_project.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,30 @@ class ArcgisMapProject {

final Directory root;

DartPackage get arcgisMap =>
DartPackage.fromDirectory(root.directory('arcgis_map'))!;
DartPackage get arcgisMapSdk =>
DartPackage.fromDirectory(root.directory('arcgis_map_sdk'))!;

DartPackage get arcgisMapExample =>
DartPackage.fromDirectory(root.directory('example'))!;

DartPackage get arcgisMapPlatformInterface => DartPackage.fromDirectory(
root.directory('arcgis_map_platform_interface'),
DartPackage get arcgisMapSdkPlatformInterface => DartPackage.fromDirectory(
root.directory('arcgis_map_sdk_platform_interface'),
)!;

DartPackage get arcgisMapWeb =>
DartPackage.fromDirectory(root.directory('arcgis_map_web'))!;
DartPackage get arcgisMapSdkWeb =>
DartPackage.fromDirectory(root.directory('arcgis_map_sdk_web'))!;

DartPackage get arcgisMapAndroid =>
DartPackage.fromDirectory(root.directory('arcgis_map_android'))!;
DartPackage get arcgisMapSdkAndroid =>
DartPackage.fromDirectory(root.directory('arcgis_map_sdk_android'))!;

DartPackage get arcgisMapIos =>
DartPackage get arcgisMapSdkIos =>
DartPackage.fromDirectory(root.directory('arcgis_map_ios'))!;

DartPackage get arcgisMapMethodChannel =>
DartPackage.fromDirectory(root.directory('arcgis_map_method_channel'))!;
DartPackage get arcgisMapSdkMethodChannel => DartPackage.fromDirectory(
root.directory('arcgis_map_sdk_method_channel'))!;

DartPackage get amSidekickPackage =>
DartPackage.fromDirectory(root.directory('am_sidekick'))!;

File get flutterw => root.file('flutterw');

List<DartPackage>? _packages;

List<DartPackage> get allPackages {
return _packages ??= root
.directory('')
.listSync()
.whereType<Directory>()
.mapNotNull((it) => DartPackage.fromDirectory(it))
.toList()
..add(arcgisMapExample);
}
}
2 changes: 1 addition & 1 deletion am_sidekick/lib/src/commands/generate_arcgis_webpack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class GenerateArcgisWebpack extends Command {
Future<void> run() async {
final root = afProject.root;
final arcgisWebpackPath = root.directory('arcgis_webpack').path;
final arcgisMapWebPath = root.directory('arcgis_map_web').path;
final arcgisMapWebPath = root.directory('arcgis_map_sdk_web').path;
print('Root path: $arcgisWebpackPath');

/// Check if NPM is installed
Expand Down
16 changes: 8 additions & 8 deletions am_sidekick/lib/src/commands/release/bump_version_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final versionOption = CliOption(

class BumpVersionCommand extends Command {
@override
final String description = 'Bumps the arcgis_map version';
final String description = 'Bumps the arcgis_map_sdk version';

@override
final String name = 'bump-version';
Expand Down Expand Up @@ -78,12 +78,12 @@ class BumpVersionCommand extends Command {

final packages = {
afProject.arcgisMapExample,
afProject.arcgisMap,
afProject.arcgisMapPlatformInterface,
afProject.arcgisMapWeb,
afProject.arcgisMapAndroid,
afProject.arcgisMapIos,
afProject.arcgisMapMethodChannel,
afProject.arcgisMapSdk,
afProject.arcgisMapSdkPlatformInterface,
afProject.arcgisMapSdkWeb,
afProject.arcgisMapSdkAndroid,
afProject.arcgisMapSdkIos,
afProject.arcgisMapSdkMethodChannel,
};
for (final package in packages) {
final pubspecFile = package.pubspec;
Expand Down Expand Up @@ -140,7 +140,7 @@ class BumpVersionCommand extends Command {
/// save to disk
pubspecFile.replaceFirst(version.toString(), newVersion.toString());
print(
'Arcgis_map version bumped from ${yellow(version.toString())} => ${green(newVersion.toString())}',
'arcgis_map_sdk version bumped from ${yellow(version.toString())} => ${green(newVersion.toString())}',
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class EditDependencyOverridesCommand extends Command {

final pubspecFiles = {
afProject.arcgisMapExample.pubspec,
afProject.arcgisMap.pubspec,
afProject.arcgisMapPlatformInterface.pubspec,
afProject.arcgisMapWeb.pubspec,
afProject.arcgisMapAndroid.pubspec,
afProject.arcgisMapIos.pubspec,
afProject.arcgisMapMethodChannel.pubspec,
afProject.arcgisMapSdk.pubspec,
afProject.arcgisMapSdkPlatformInterface.pubspec,
afProject.arcgisMapSdkWeb.pubspec,
afProject.arcgisMapSdkAndroid.pubspec,
afProject.arcgisMapSdkIos.pubspec,
afProject.arcgisMapSdkMethodChannel.pubspec,
};

for (final pubspecFile in pubspecFiles) {
Expand Down
12 changes: 6 additions & 6 deletions am_sidekick/lib/src/commands/release/publish_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class PublishCommand extends Command {
final bool dryRun = dryRunFlag.getFrom(argResults);

final packages = {
afProject.arcgisMap,
afProject.arcgisMapSdk,
afProject.arcgisMapExample,
afProject.arcgisMapPlatformInterface,
afProject.arcgisMapWeb,
afProject.arcgisMapAndroid,
afProject.arcgisMapIos,
afProject.arcgisMapMethodChannel,
afProject.arcgisMapSdkPlatformInterface,
afProject.arcgisMapSdkWeb,
afProject.arcgisMapSdkAndroid,
afProject.arcgisMapSdkIos,
afProject.arcgisMapSdkMethodChannel,
};

/// Get the version from the pubspec to tag
Expand Down
7 changes: 4 additions & 3 deletions am_sidekick/lib/src/commands/test_command.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:am_sidekick/am_sidekick.dart';
import 'package:am_sidekick/src/commands/utils.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:sidekick_core/sidekick_core.dart';
Expand All @@ -17,7 +16,8 @@ class TestCommand extends Command {
..addOption(
'package',
abbr: 'p',
allowed: afProject.allPackages.map((it) => it.name),
allowed:
findAllPackages(SidekickContext.projectRoot).map((it) => it.name),
);
}

Expand All @@ -35,7 +35,8 @@ class TestCommand extends Command {
}

// outside of package, fallback to all packages
for (final package in afProject.allPackages) {
final allPackages = findAllPackages(SidekickContext.projectRoot);
for (final package in allPackages) {
collector.add(_test(package));
print('\n');
}
Expand Down
6 changes: 3 additions & 3 deletions am_sidekick/lib/src/commands/utils.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:am_sidekick/am_sidekick.dart';
import 'package:sidekick_core/sidekick_core.dart';

T runForPackage<T>(String name, T Function(DartPackage package) block) {
final allPackages = findAllPackages(SidekickContext.projectRoot);
final DartPackage? package =
afProject.allPackages.firstOrNullWhere((it) => it.name == name);
allPackages.firstOrNullWhere((it) => it.name == name);
if (package == null) {
final packageOptions =
afProject.allPackages.map((it) => it.name).toList(growable: false);
allPackages.map((it) => it.name).toList(growable: false);
error(
'Could not find package $name. '
'Please use one of ${packageOptions.joinToString()}',
Expand Down
5 changes: 0 additions & 5 deletions arcgis_map/lib/arcgis_map.dart

This file was deleted.

11 changes: 0 additions & 11 deletions arcgis_map/pubspec_overrides.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions arcgis_map_android/README.md

This file was deleted.

1 change: 0 additions & 1 deletion arcgis_map_android/android/settings.gradle

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion arcgis_map_android/lib/arcgis_map_android.dart

This file was deleted.

5 changes: 0 additions & 5 deletions arcgis_map_android/pubspec_overrides.yaml

This file was deleted.

1 change: 0 additions & 1 deletion arcgis_map_ios/lib/arcgis_map_ios.dart

This file was deleted.

5 changes: 0 additions & 5 deletions arcgis_map_ios/pubspec_overrides.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions arcgis_map_method_channel/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions arcgis_map_method_channel/pubspec_overrides.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions arcgis_map_platform_interface/README.md

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions arcgis_map/README.md → arcgis_map_sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# arcgis_map for Flutter
# Arcgis Maps SDK for Flutter

[![Flutter Community: arcgis_map](https://fluttercommunity.dev/_github/header/arcgis_map)](https://github.com/fluttercommunity/community)
[![Flutter Community: arcgis_map_sdk](https://fluttercommunity.dev/_github/header/arcgis_map_sdk)](https://github.com/fluttercommunity/community)


<img src="https://github.com/fluttercommunity/arcgis_map/assets/1096485/14bd3d39-0770-4fd0-9d94-c6bce679fcd4" alt="Arcgis on iPad" width="600" />
Expand All @@ -14,24 +14,24 @@ In your app's pubspec.yaml dependencies, add:

```yaml
dependencies:
arcgis_map: ^0.7.5
arcgis_map_sdk: ^0.8.0
```
### Android only setup
(Android) In `<app>/android/app/proguard-rules.pro` add:

```
-keep class esri.arcgis.flutter_plugin.** { *; }
-keep class dev.fluttercommunity.arcgis_map_sdk.** { *; }
```
### Use ArcgisMap
Integrate the `ArcgisMap` Widget
```dart
import 'package:arcgis_map/arcgis_map.dart';
import 'package:arcgis_map_platform_interface/arcgis_map_platform_interface.dart';
import 'package:arcgis_map_sdk/arcgis_map_sdk.dart';
import 'package:arcgis_map_sdk_platform_interface/arcgis_map_sdk_platform_interface.dart';
@override
Widget build(BuildContext context) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Please visit the `example` project in the root of the repository

[Example project](https://github.com/fluttercommunity/arcgis_map/tree/main/example)
[Example project](https://github.com/fluttercommunity/arcgis_map_sdk/tree/main/example)
6 changes: 6 additions & 0 deletions arcgis_map_sdk/lib/arcgis_map_sdk.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// ignore: unnecessary_library_directive
library arcgis_map;

export 'package:arcgis_map_sdk/src/arcgis_map_controller.dart';
export 'package:arcgis_map_sdk/src/arcgis_map_sdk.dart';
export 'package:arcgis_map_sdk_platform_interface/arcgis_map_sdk_platform_interface.dart';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:arcgis_map_platform_interface/arcgis_map_platform_interface.dart';
import 'package:arcgis_map_sdk_platform_interface/arcgis_map_sdk_platform_interface.dart';
import 'package:flutter/services.dart';

class ArcgisMapController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import 'dart:async';
import 'dart:io';

import 'package:arcgis_map/src/arcgis_map_controller.dart';
import 'package:arcgis_map_android/arcgis_map_android.dart';
import 'package:arcgis_map_ios/arcgis_map_ios.dart';
import 'package:arcgis_map_platform_interface/arcgis_map_platform_interface.dart';
import 'package:arcgis_map_sdk/src/arcgis_map_controller.dart';
import 'package:arcgis_map_sdk_android/arcgis_map_sdk_android.dart';
import 'package:arcgis_map_sdk_ios/arcgis_map_sdk_ios.dart';
import 'package:arcgis_map_sdk_platform_interface/arcgis_map_sdk_platform_interface.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';

Expand Down
Loading

0 comments on commit aab2b6b

Please sign in to comment.