diff --git a/.github/workflows/analyze.yaml b/.github/workflows/analyze.yaml index a195c13..a5cfeef 100644 --- a/.github/workflows/analyze.yaml +++ b/.github/workflows/analyze.yaml @@ -34,9 +34,9 @@ jobs: flutter-version: "3.19.x" channel: "stable" cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - name: "Run Flutter Analyze" run: melos run flutter-analyze @@ -54,9 +54,9 @@ jobs: flutter-version: "3.19.x" channel: "stable" cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - name: Restore Cache uses: actions/cache/restore@v4 id: cache diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 074f3ae..724e156 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,9 +40,9 @@ jobs: flutter-version: "3.19.x" channel: "stable" cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - name: "Run flutter test" run: melos run test:dart @@ -62,9 +62,9 @@ jobs: flutter-version: "3.19.x" channel: "stable" cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - name: "Run Android native unit tests" run: melos run test:android @@ -88,9 +88,9 @@ jobs: flutter-version: "3.19.x" channel: "stable" cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - name: Generate necessary files with flutter build working-directory: ${{ matrix.working_directory }} run: flutter build ios --config-only @@ -117,9 +117,9 @@ jobs: flutter-version: "3.19.x" channel: "stable" cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - name: "Run build for Android" run: melos run flutter-build-android @@ -138,9 +138,9 @@ jobs: channel: "stable" cache: true architecture: x64 - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + - uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: - melos-version: "3.0.1" + melos-version: "6.0.0" - uses: actions/cache@v4 with: path: "**/Pods" diff --git a/.github/workflows/licence-check.yaml b/.github/workflows/licence-check.yaml index d95d2a9..c29a8b9 100644 --- a/.github/workflows/licence-check.yaml +++ b/.github/workflows/licence-check.yaml @@ -42,11 +42,11 @@ jobs: channel: "stable" cache: true - name: Install Melos - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a + uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388 with: # Running `melos bootstrap` is not needed because we use Melos just # for the `check-license-header` script. run-bootstrap: false - melos-version: "3.0.1" + melos-version: "6.0.0" - name: Check license header run: melos run check-license-header diff --git a/melos.yaml b/melos.yaml index 2255543..b24540a 100644 --- a/melos.yaml +++ b/melos.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: google_maps_flutter_navigation +name: google_maps_flutter_navigation repository: https://github.com/googlemaps/flutter-navigation-sdk packages: @@ -50,7 +50,9 @@ scripts: format: run: | - melos run format:dart && melos run format:ios && melos run format:android + melos run format:dart && \ + melos run format:ios && \ + melos run format:android description: | Formats the code of all packages (Dart, iOS, Android). @@ -62,15 +64,17 @@ scripts: format:ios: run: | - swiftformat . + swiftformat --quiet . description: | Formats the code of iOS package with swiftformat. - Requires `swiftformat` (can be installed via Brew on macOS). format:android: run: | - if [ ! -f android/gradlew ]; then flutter build apk --config-only; fi && - cd android && ./gradlew ktfmtFormat + if [ -d "example" ]; then cd example; fi && \ + if [ ! -f android/gradlew ]; then flutter build apk --config-only; fi && \ + cd android && \ + ./gradlew ktfmtFormat exec: concurrency: 1 failFast: true @@ -79,7 +83,7 @@ scripts: packageFilters: dirExists: - android - scope: '*example*' + scope: "*example*" test:dart: run: flutter pub get && flutter test @@ -88,12 +92,14 @@ scripts: failFast: true description: Flutter test packageFilters: - fileExists: 'pigeons/messages.dart' + fileExists: "pigeons/messages.dart" test:android: run: | - if [ ! -f android/gradlew ]; then flutter build apk --config-only; fi \ - && cd android && ./gradlew test + if [ -d "example" ]; then cd example; fi && \ + if [ ! -f android/gradlew ]; then flutter build apk --config-only; fi && \ + cd android && \ + ./gradlew test exec: concurrency: 1 failFast: true @@ -101,10 +107,12 @@ scripts: packageFilters: dirExists: - android - scope: '*example*' + scope: "*example*" test:ios: - run: ../tools/test-ios.sh + run: | + if [ -d "example" ]; then cd example; fi && \ + ../tools/test-ios.sh exec: concurrency: 1 failFast: true @@ -112,10 +120,12 @@ scripts: packageFilters: dirExists: - ios - scope: '*example*' + scope: "*example*" flutter-build-android: - run: flutter pub get && flutter build apk && flutter build appbundle + run: | + if [ -d "example" ]; then cd example; fi && \ + flutter pub get && flutter build apk && flutter build appbundle exec: concurrency: 1 failFast: true @@ -123,10 +133,12 @@ scripts: packageFilters: dirExists: - android - scope: '*example*' + scope: "*example*" flutter-build-ios: - run: flutter pub get && flutter build ios --release --no-codesign + run: | + if [ -d "example" ]; then cd example; fi && \ + flutter pub get && flutter build ios --release --no-codesign exec: concurrency: 1 failFast: true @@ -134,23 +146,24 @@ scripts: packageFilters: dirExists: - ios - scope: '*example*' + scope: "*example*" generate:mocks: - exec: | - dart run build_runner build --delete-conflicting-outputs && - melos run format --no-select && melos run add-license-header + exec: | + dart run build_runner build --delete-conflicting-outputs && \ + melos run format && \ + melos run add-license-header description: Generate the pigeon messages for all the supported packages. packageFilters: - fileExists: 'pigeons/messages.dart' + fileExists: "pigeons/messages.dart" generate:pigeon: - exec: | - dart run pigeon --input ./pigeons/messages.dart && - melos run format --no-select + exec: | + dart run pigeon --input ./pigeons/messages.dart && \ + melos run format description: Generate the pigeon messages for all the supported packages. packageFilters: - fileExists: 'pigeons/messages.dart' + fileExists: "pigeons/messages.dart" add-license-header: # If you add here another --ignore flag, add it also to @@ -158,8 +171,10 @@ scripts: run: | addlicense -f header_template.txt \ --ignore "**/Pods/**" \ - --ignore "**/.dart_tool/flutter_build/**" \ + --ignore "**/.dart_tool/**" \ --ignore "**/example/build/**" \ + --ignore "**/example/integration_test/test_bundle.dart" \ + --ignore "build/**" \ --ignore "**/GeneratedPluginRegistrant.*" \ --ignore "**/flutter_export_environment.sh" \ . @@ -172,8 +187,10 @@ scripts: addlicense -f header_template.txt \ --check \ --ignore "**/Pods/**" \ - --ignore "**/.dart_tool/flutter_build/**" \ + --ignore "**/.dart_tool/**" \ --ignore "**/example/build/**" \ + --ignore "**/example/integration_test/test_bundle.dart" \ + --ignore "build/**" \ --ignore "**/GeneratedPluginRegistrant.*" \ --ignore "**/flutter_export_environment.sh" \ . diff --git a/pubspec.yaml b/pubspec.yaml index 5a9d535..fb02f7e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dev_dependencies: flutter_lints: ^3.0.1 flutter_test: sdk: flutter - melos: ^3.0.1 + melos: ^6.0.0 mockito: 5.4.4 pigeon: 15.0.0