Skip to content

Commit 4e13bba

Browse files
committed
Rename main package
1 parent 9c072bf commit 4e13bba

37 files changed

+83
-130
lines changed

am_sidekick/lib/am_sidekick.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ArcgisMapProject afProject = ArcgisMapProject(SidekickContext.projectRoot);
1414

1515
Future<void> runAm(List<String> args) async {
1616
final runner = initializeSidekick(
17-
mainProjectPath: 'arcgis_map',
17+
mainProjectPath: 'arcgis_map_sdk',
1818
flutterSdkPath: systemFlutterSdkPath(),
1919
);
2020

am_sidekick/lib/src/arcgis_map_project.dart

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,30 @@ class ArcgisMapProject {
55

66
final Directory root;
77

8-
DartPackage get arcgisMap =>
9-
DartPackage.fromDirectory(root.directory('arcgis_map'))!;
8+
DartPackage get arcgisMapSdk =>
9+
DartPackage.fromDirectory(root.directory('arcgis_map_sdk'))!;
1010

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

14-
DartPackage get arcgisMapPlatformInterface => DartPackage.fromDirectory(
14+
DartPackage get arcgisMapSdkPlatformInterface => DartPackage.fromDirectory(
1515
root.directory('arcgis_map_sdk_platform_interface'),
1616
)!;
1717

18-
DartPackage get arcgisMapWeb =>
18+
DartPackage get arcgisMapSdkWeb =>
1919
DartPackage.fromDirectory(root.directory('arcgis_map_sdk_web'))!;
2020

21-
DartPackage get arcgisMapAndroid =>
21+
DartPackage get arcgisMapSdkAndroid =>
2222
DartPackage.fromDirectory(root.directory('arcgis_map_sdk_android'))!;
2323

24-
DartPackage get arcgisMapIos =>
24+
DartPackage get arcgisMapSdkIos =>
2525
DartPackage.fromDirectory(root.directory('arcgis_map_ios'))!;
2626

27-
DartPackage get arcgisMapMethodChannel => DartPackage.fromDirectory(
27+
DartPackage get arcgisMapSdkMethodChannel => DartPackage.fromDirectory(
2828
root.directory('arcgis_map_sdk_method_channel'))!;
2929

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

3333
File get flutterw => root.file('flutterw');
34-
35-
List<DartPackage>? _packages;
36-
37-
List<DartPackage> get allPackages {
38-
return _packages ??= root
39-
.directory('')
40-
.listSync()
41-
.whereType<Directory>()
42-
.mapNotNull((it) => DartPackage.fromDirectory(it))
43-
.toList()
44-
..add(arcgisMapExample);
45-
}
4634
}

am_sidekick/lib/src/commands/release/bump_version_command.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final versionOption = CliOption(
2323

2424
class BumpVersionCommand extends Command {
2525
@override
26-
final String description = 'Bumps the arcgis_map version';
26+
final String description = 'Bumps the arcgis_map_sdk version';
2727

2828
@override
2929
final String name = 'bump-version';
@@ -78,12 +78,12 @@ class BumpVersionCommand extends Command {
7878

7979
final packages = {
8080
afProject.arcgisMapExample,
81-
afProject.arcgisMap,
82-
afProject.arcgisMapPlatformInterface,
83-
afProject.arcgisMapWeb,
84-
afProject.arcgisMapAndroid,
85-
afProject.arcgisMapIos,
86-
afProject.arcgisMapMethodChannel,
81+
afProject.arcgisMapSdk,
82+
afProject.arcgisMapSdkPlatformInterface,
83+
afProject.arcgisMapSdkWeb,
84+
afProject.arcgisMapSdkAndroid,
85+
afProject.arcgisMapSdkIos,
86+
afProject.arcgisMapSdkMethodChannel,
8787
};
8888
for (final package in packages) {
8989
final pubspecFile = package.pubspec;
@@ -140,7 +140,7 @@ class BumpVersionCommand extends Command {
140140
/// save to disk
141141
pubspecFile.replaceFirst(version.toString(), newVersion.toString());
142142
print(
143-
'Arcgis_map version bumped from ${yellow(version.toString())} => ${green(newVersion.toString())}',
143+
'arcgis_map_sdk version bumped from ${yellow(version.toString())} => ${green(newVersion.toString())}',
144144
);
145145
}
146146
}

am_sidekick/lib/src/commands/release/edit_dependency_overrides_command.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class EditDependencyOverridesCommand extends Command {
3333

3434
final pubspecFiles = {
3535
afProject.arcgisMapExample.pubspec,
36-
afProject.arcgisMap.pubspec,
37-
afProject.arcgisMapPlatformInterface.pubspec,
38-
afProject.arcgisMapWeb.pubspec,
39-
afProject.arcgisMapAndroid.pubspec,
40-
afProject.arcgisMapIos.pubspec,
41-
afProject.arcgisMapMethodChannel.pubspec,
36+
afProject.arcgisMapSdk.pubspec,
37+
afProject.arcgisMapSdkPlatformInterface.pubspec,
38+
afProject.arcgisMapSdkWeb.pubspec,
39+
afProject.arcgisMapSdkAndroid.pubspec,
40+
afProject.arcgisMapSdkIos.pubspec,
41+
afProject.arcgisMapSdkMethodChannel.pubspec,
4242
};
4343

4444
for (final pubspecFile in pubspecFiles) {

am_sidekick/lib/src/commands/release/publish_command.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ class PublishCommand extends Command {
3636
final bool dryRun = dryRunFlag.getFrom(argResults);
3737

3838
final packages = {
39-
afProject.arcgisMap,
39+
afProject.arcgisMapSdk,
4040
afProject.arcgisMapExample,
41-
afProject.arcgisMapPlatformInterface,
42-
afProject.arcgisMapWeb,
43-
afProject.arcgisMapAndroid,
44-
afProject.arcgisMapIos,
45-
afProject.arcgisMapMethodChannel,
41+
afProject.arcgisMapSdkPlatformInterface,
42+
afProject.arcgisMapSdkWeb,
43+
afProject.arcgisMapSdkAndroid,
44+
afProject.arcgisMapSdkIos,
45+
afProject.arcgisMapSdkMethodChannel,
4646
};
4747

4848
/// Get the version from the pubspec to tag

am_sidekick/lib/src/commands/test_command.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class TestCommand extends Command {
1717
..addOption(
1818
'package',
1919
abbr: 'p',
20-
allowed: afProject.allPackages.map((it) => it.name),
20+
allowed:
21+
findAllPackages(SidekickContext.projectRoot).map((it) => it.name),
2122
);
2223
}
2324

@@ -35,7 +36,8 @@ class TestCommand extends Command {
3536
}
3637

3738
// outside of package, fallback to all packages
38-
for (final package in afProject.allPackages) {
39+
final allPackages = findAllPackages(SidekickContext.projectRoot);
40+
for (final package in allPackages) {
3941
collector.add(_test(package));
4042
print('\n');
4143
}

am_sidekick/lib/src/commands/utils.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import 'package:am_sidekick/am_sidekick.dart';
21
import 'package:sidekick_core/sidekick_core.dart';
32

43
T runForPackage<T>(String name, T Function(DartPackage package) block) {
4+
final allPackages = findAllPackages(SidekickContext.projectRoot);
55
final DartPackage? package =
6-
afProject.allPackages.firstOrNullWhere((it) => it.name == name);
6+
allPackages.firstOrNullWhere((it) => it.name == name);
77
if (package == null) {
88
final packageOptions =
9-
afProject.allPackages.map((it) => it.name).toList(growable: false);
9+
allPackages.map((it) => it.name).toList(growable: false);
1010
error(
1111
'Could not find package $name. '
1212
'Please use one of ${packageOptions.joinToString()}',

arcgis_map/lib/arcgis_map.dart

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)