Skip to content

Commit

Permalink
Rename main package
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Nov 18, 2023
1 parent 9c072bf commit 4e13bba
Show file tree
Hide file tree
Showing 37 changed files with 83 additions and 130 deletions.
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
26 changes: 7 additions & 19 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(
DartPackage get arcgisMapSdkPlatformInterface => DartPackage.fromDirectory(
root.directory('arcgis_map_sdk_platform_interface'),
)!;

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

DartPackage get arcgisMapAndroid =>
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(
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);
}
}
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
6 changes: 4 additions & 2 deletions am_sidekick/lib/src/commands/test_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 +36,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.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 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,7 +14,7 @@ In your app's pubspec.yaml dependencies, add:

```yaml
dependencies:
arcgis_map: ^0.7.5
arcgis_map_sdk: ^0.8.0
```
Expand All @@ -30,7 +30,7 @@ dependencies:
Integrate the `ArcgisMap` Widget
```dart
import 'package:arcgis_map/arcgis_map.dart';
import 'package:arcgis_map_sdk/arcgis_map_sdk.dart';
import 'package:arcgis_map_sdk_platform_interface/arcgis_map_sdk_platform_interface.dart';
@override
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)
5 changes: 5 additions & 0 deletions arcgis_map_sdk/lib/arcgis_map_sdk.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// ignore: unnecessary_library_directive
library arcgis_map;

export 'package:arcgis_map_sdk/src/arcgis_map_sdk.dart';
export 'package:arcgis_map_sdk/src/arcgis_map_controller.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'dart:async';
import 'dart:io';

import 'package:arcgis_map/src/arcgis_map_controller.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';
Expand Down
4 changes: 2 additions & 2 deletions arcgis_map/pubspec.yaml → arcgis_map_sdk/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arcgis_map
name: arcgis_map_sdk
description: Esri ArcGIS map for Flutter for Web, iOS and Android platforms
version: 0.7.6
repository: https://github.com/fluttercommunity/arcgis_map
repository: https://github.com/fluttercommunity/arcgis_map_sdk
maintainer: Matthaios Saitakis (@MatthaiosSait), Stefan Schaller (@stefanschaller), Julian Bissekkou (@JulianBissekkou),
Pascal Welsch (@passsy), Max Peters (@maxpeters)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion arcgis_map_sdk_android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[![pub package](https://img.shields.io/pub/v/arcgis_map_sdk_android.svg)](https://pub.dev/packages/arcgis_map_sdk_android)

Android implementation of [`arcgis_map`](https://pub.dev/packages/arcgis_map).
Android implementation of [`arcgis_map_sdk`](https://pub.dev/packages/arcgis_map_sdk).
4 changes: 2 additions & 2 deletions arcgis_map_sdk_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arcgis_map_sdk_android
description: Esri ArcGIS Flutter Android implementation.
version: 0.7.6
repository: https://github.com/fluttercommunity/arcgis_map
repository: https://github.com/fluttercommunity/arcgis_map_sdk
maintainer: Stefan Schaller (@stefanschaller), Julian Bissekkou (@JulianBissekkou)

environment:
Expand All @@ -20,7 +20,7 @@ dev_dependencies:

flutter:
plugin:
implements: arcgis_map
implements: arcgis_map_sdk
platforms:
android:
package: dev.fluttercommunity.arcgis_map_sdk_android
Expand Down
2 changes: 1 addition & 1 deletion arcgis_map_sdk_ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[![pub package](https://img.shields.io/pub/v/arcgis_map_ios.svg)](https://pub.dev/packages/arcgis_map_ios)

iOS implementation of [`arcgis_map`](https://pub.dev/packages/arcgis_map).
iOS implementation of [`arcgis_map_sdk`](https://pub.dev/packages/arcgis_map_sdk).
4 changes: 2 additions & 2 deletions arcgis_map_sdk_ios/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arcgis_map_sdk_ios
description: Esri ArcGIS Flutter iOS implementation.
version: 0.7.6
repository: https://github.com/fluttercommunity/arcgis_map
repository: https://github.com/fluttercommunity/arcgis_map_sdk
maintainer: Stefan Schaller (@stefanschaller), Julian Bissekkou (@JulianBissekkou)

environment:
Expand All @@ -20,7 +20,7 @@ dev_dependencies:

flutter:
plugin:
implements: arcgis_map
implements: arcgis_map_sdk
platforms:
ios:
pluginClass: ArcgisMapPlugin
Expand Down
4 changes: 2 additions & 2 deletions arcgis_map_sdk_method_channel/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# arcgis_map method channels
# arcgis_map_sdk method channels

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

[![pub package](https://img.shields.io/pub/v/arcgis_map_sdk_method_channel.svg)](https://pub.dev/packages/arcgis_map_sdk_method_channel)

Platform channels for [`arcgis_map_ios`](https://pub.dev/packages/arcgis_map_ios) and [`arcgis_map_sdk_android`](https://pub.dev/packages/arcgis_map_sdk_android).
Platform channels for [`arcgis_map_sdk_ios`](https://pub.dev/packages/arcgis_map_sdk_ios) and [`arcgis_map_sdk_android`](https://pub.dev/packages/arcgis_map_sdk_android).
2 changes: 1 addition & 1 deletion arcgis_map_sdk_method_channel/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arcgis_map_sdk_method_channel
description: Esri ArcGIS Flutter method channel implementation.
version: 0.7.5
repository: https://github.com/fluttercommunity/arcgis_map
repository: https://github.com/fluttercommunity/arcgis_map_sdk
maintainer: Stefan Schaller (@stefanschaller), Julian Bissekkou (@JulianBissekkou)

environment:
Expand Down
4 changes: 2 additions & 2 deletions arcgis_map_sdk_platform_interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

[![pub package](https://img.shields.io/pub/v/arcgis_map_sdk_platform_interface.svg)](https://pub.dev/packages/arcgis_map_sdk_platform_interface)

A common platform interface for [`arcgis_map`](https://pub.dev/packages/arcgis_map).
A common platform interface for [`arcgis_map_sdk`](https://pub.dev/packages/arcgis_map_sdk).

## Usage

This package is already included as part of the `arcgis_map` package dependency, and will be included automatically when using `arcgis_map`.
This package is already included as part of the `arcgis_map_sdk` package dependency, and will be included automatically when using `arcgis_map_sdk`.
4 changes: 2 additions & 2 deletions arcgis_map_sdk_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arcgis_map_sdk_platform_interface
description: A common platform interface for the flutter arcgis_map package
description: A common platform interface for the flutter arcgis_map_sdk package
version: 1.0.0
repository: https://github.com/fluttercommunity/arcgis_map
repository: https://github.com/fluttercommunity/arcgis_map_sdk
maintainer: Matthaios Saitakis (@MatthaiosSait), Stefan Schaller (@stefanschaller), Julian Bissekkou (@JulianBissekkou),
Pascal Welsch (@passsy), Max Peters (@maxpeters)

Expand Down
2 changes: 1 addition & 1 deletion arcgis_map_sdk_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[![pub package](https://img.shields.io/pub/v/arcgis_map_sdk_web.svg)](https://pub.dev/packages/arcgis_map_sdk_web)

Web implementation of [`arcgis_map`](https://pub.dev/packages/arcgis_map).
Web implementation of [`arcgis_map_sdk`](https://pub.dev/packages/arcgis_map_sdk).
4 changes: 2 additions & 2 deletions arcgis_map_sdk_web/example/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to use arcgis_map in Web
# How to use arcgis_map_sdk in Web

No special requirements are needed to use this package.
Just follow the steps of the [arcgis_map](https://pub.dev/packages/arcgis_map) package.
Just follow the steps of the [arcgis_map_sdk](https://pub.dev/packages/arcgis_map_sdk) package.
4 changes: 2 additions & 2 deletions arcgis_map_sdk_web/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: arcgis_map_sdk_web
description: Esri ArcGIS Flutter web implementation.
version: 0.7.5
repository: https://github.com/fluttercommunity/arcgis_map
repository: https://github.com/fluttercommunity/arcgis_map_sdk
maintainer: Matthaios Saitakis (@MatthaiosSait), Pascal Welsch (@passsy), Max Peters (@maxpeters)

environment:
Expand All @@ -23,7 +23,7 @@ dev_dependencies:

flutter:
plugin:
implements: arcgis_map
implements: arcgis_map_sdk
platforms:
web:
pluginClass: ArcgisMapWeb
Expand Down
Loading

0 comments on commit 4e13bba

Please sign in to comment.