From cf582256366899d8e1fc63fe5b6bab22f1fdcc38 Mon Sep 17 00:00:00 2001 From: Filip Hracek Date: Fri, 5 Dec 2025 15:34:26 +0100 Subject: [PATCH 1/2] Upgrade melos to 7.0.0+ This moves melos configuration from melos.yaml to pubspec.yaml. See migration details here: https://github.com/invertase/melos/blob/main/docs/guides/migrations.mdx#6xx-to-7xx --- melos.yaml | 111 --------------------------------------------------- pubspec.lock | 30 ++++++++++---- pubspec.yaml | 101 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 123 insertions(+), 119 deletions(-) delete mode 100644 melos.yaml diff --git a/melos.yaml b/melos.yaml deleted file mode 100644 index b0405a2..0000000 --- a/melos.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: flutter_maps_samples -repository: https://github.com/googlemaps-samples/flutter-maps-samples - -packages: - - . - -command: - version: - # Generate commit links in package changelogs. - linkToCommits: true - # # Only allow versioning to happen on main branch. - # branch: master - # Additionally build a changelog at the root of the workspace. - workspaceChangelog: true - - bootstrap: - # It seems so that running "pub get" in parallel has some issues (like - # https://github.com/dart-lang/pub/issues/3404). Disabling this feature - # makes the CI much more stable. - runPubGetInParallel: false - usePubspecOverrides: true - -scripts: - flutter-analyze: - # We are setting the concurrency to 1 because a higher concurrency can crash - # the analysis server on low performance machines (like GitHub Actions). - run: flutter analyze . --fatal-infos - exec: - concurrency: 1 - description: | - Run `flutter analyze` in all packages. - - format: - run: | - dart format . - description: | - Formats the code with dart format. - - test: - run: flutter pub get && flutter test - exec: - concurrency: 1 - failFast: true - description: Flutter test - - flutter-build-android: - run: | - flutter pub get && flutter build apk && flutter build appbundle - exec: - concurrency: 1 - failFast: true - description: Build the sample app for Android. - - flutter-build-ios: - run: | - flutter pub get && flutter build ios --release --no-codesign - exec: - concurrency: 1 - failFast: true - description: Build the sample app for iOS. - - add-license-header: - # If you add here another --ignore flag, add it also to - # "check-license-header". - run: | - addlicense -f header_template.txt \ - --ignore ".idea/**" \ - --ignore "android/app/.cxx/**" \ - --ignore "**/Pods/**" \ - --ignore "**/.dart_tool/**" \ - --ignore "build/**" \ - --ignore "**/GeneratedPluginRegistrant.*" \ - --ignore "**/flutter_export_environment.sh" \ - --ignore "**/FlutterGeneratedPluginSwiftPackage/**" \ - --ignore ".github/PULL_REQUEST_TEMPLATE.md" \ - --ignore ".github/ISSUE_TEMPLATE/**" \ - . - description: Add a license header to all necessary files. - - check-license-header: - # If you add here another --ignore flag, add it also to - # "add-license-header". - run: | - addlicense -f header_template.txt \ - --check \ - --ignore ".idea/**" \ - --ignore "android/app/.cxx/**" \ - --ignore "**/Pods/**" \ - --ignore "**/.dart_tool/**" \ - --ignore "build/**" \ - --ignore "**/GeneratedPluginRegistrant.*" \ - --ignore "**/flutter_export_environment.sh" \ - --ignore "**/FlutterGeneratedPluginSwiftPackage/**" \ - --ignore ".github/PULL_REQUEST_TEMPLATE.md" \ - --ignore ".github/ISSUE_TEMPLATE/**" \ - . - description: Add a license header to all necessary files. diff --git a/pubspec.lock b/pubspec.lock index 8a0a9fe..1442da9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: cli_launcher - sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005" + sha256: "17d2744fb9a254c49ec8eda582536abe714ea0131533e24389843a4256f82eac" url: "https://pub.dev" source: hosted - version: "0.3.1" + version: "0.3.2+1" cli_util: dependency: transitive description: @@ -236,10 +236,10 @@ packages: dependency: transitive description: name: http - sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.6.0" http_parser: dependency: transitive description: @@ -316,10 +316,10 @@ packages: dependency: "direct dev" description: name: melos - sha256: "4280dc46bd5b741887cce1e67e5c1a6aaf3c22310035cf5bd33dceeeda62ed22" + sha256: ff2da25990d83b0db883eb257e4fa25eb78150a329e7bfab7a379499d0f5f6f7 url: "https://pub.dev" source: hosted - version: "6.3.3" + version: "7.3.0" meta: dependency: transitive description: @@ -344,6 +344,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" + url: "https://pub.dev" + source: hosted + version: "7.0.1" platform: dependency: transitive description: @@ -509,6 +517,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + xml: + dependency: transitive + description: + name: xml + sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" + url: "https://pub.dev" + source: hosted + version: "6.6.1" yaml: dependency: transitive description: @@ -526,5 +542,5 @@ packages: source: hosted version: "2.2.2" sdks: - dart: ">=3.8.0 <4.0.0" + dart: ">=3.9.0 <4.0.0" flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 04ca9a6..455a89c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,10 +32,109 @@ dev_dependencies: flutter_lints: ^6.0.0 flutter_test: sdk: flutter - melos: ^6.3.3 + melos: ^7.3.0 flutter: uses-material-design: true assets: - assets/icon_flutter.png + +# Melos is this repository's CI/CD helper. +melos: + useRootAsPackage: true + categories: + app: + - "." + + command: + version: + # Generate commit links in package changelogs. + linkToCommits: true + # # Only allow versioning to happen on main branch. + # branch: master + # Additionally build a changelog at the root of the workspace. + workspaceChangelog: true + + bootstrap: + # It seems so that running "pub get" in parallel has some issues (like + # https://github.com/dart-lang/pub/issues/3404). Disabling this feature + # makes the CI much more stable. + runPubGetInParallel: false + usePubspecOverrides: true + + scripts: + flutter-analyze: + # We are setting the concurrency to 1 because a higher concurrency can crash + # the analysis server on low performance machines (like GitHub Actions). + run: flutter analyze . --fatal-infos + exec: + concurrency: 1 + description: | + Run `flutter analyze` in all packages. + + format: + run: | + dart format . + description: | + Formats the code with dart format. + + test: + run: flutter pub get && flutter test + exec: + concurrency: 1 + failFast: true + description: Flutter test + + flutter-build-android: + run: | + flutter pub get && flutter build apk && flutter build appbundle + exec: + concurrency: 1 + failFast: true + description: Build the sample app for Android. + + flutter-build-ios: + run: | + flutter pub get && flutter build ios --release --no-codesign + exec: + concurrency: 1 + failFast: true + description: Build the sample app for iOS. + + add-license-header: + # If you add here another --ignore flag, add it also to + # "check-license-header". + run: | + addlicense -f header_template.txt \ + --ignore ".idea/**" \ + --ignore "android/app/.cxx/**" \ + --ignore "**/Pods/**" \ + --ignore "**/.dart_tool/**" \ + --ignore "build/**" \ + --ignore "**/GeneratedPluginRegistrant.*" \ + --ignore "**/flutter_export_environment.sh" \ + --ignore "**/FlutterGeneratedPluginSwiftPackage/**" \ + --ignore ".github/PULL_REQUEST_TEMPLATE.md" \ + --ignore ".github/ISSUE_TEMPLATE/**" \ + . + description: Add a license header to all necessary files. + + check-license-header: + # If you add here another --ignore flag, add it also to + # "add-license-header". + run: | + addlicense -f header_template.txt \ + --check \ + --ignore ".idea/**" \ + --ignore "android/app/.cxx/**" \ + --ignore "**/Pods/**" \ + --ignore "**/.dart_tool/**" \ + --ignore "build/**" \ + --ignore "**/GeneratedPluginRegistrant.*" \ + --ignore "**/flutter_export_environment.sh" \ + --ignore "**/FlutterGeneratedPluginSwiftPackage/**" \ + --ignore ".github/PULL_REQUEST_TEMPLATE.md" \ + --ignore ".github/ISSUE_TEMPLATE/**" \ + . + description: Add a license header to all necessary files. From d1629e219a92f84acdffce9c4164b781a6d82a5c Mon Sep 17 00:00:00 2001 From: Filip Hracek Date: Fri, 5 Dec 2025 15:36:20 +0100 Subject: [PATCH 2/2] Remove versioning This lead to build failures and makes little sense for a sample repo. --- pubspec.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 455a89c..73acb1f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,14 +48,6 @@ melos: - "." command: - version: - # Generate commit links in package changelogs. - linkToCommits: true - # # Only allow versioning to happen on main branch. - # branch: master - # Additionally build a changelog at the root of the workspace. - workspaceChangelog: true - bootstrap: # It seems so that running "pub get" in parallel has some issues (like # https://github.com/dart-lang/pub/issues/3404). Disabling this feature