Skip to content

Commit

Permalink
chore: update melos to 6.0.0 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerttu authored May 17, 2024
1 parent a04d673 commit ac877c2
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/licence-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
69 changes: 43 additions & 26 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -79,7 +83,7 @@ scripts:
packageFilters:
dirExists:
- android
scope: '*example*'
scope: "*example*"

test:dart:
run: flutter pub get && flutter test
Expand All @@ -88,78 +92,89 @@ 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
description: Android native unit tests
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
description: iOS native unit tests
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
description: Build a specific example app for Android.
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
description: Build a specific example app for iOS.
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
# "check-license-header".
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" \
.
Expand All @@ -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" \
.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ac877c2

Please sign in to comment.