Skip to content

Commit

Permalink
Merge pull request #849 from bartekpacia/better_melos
Browse files Browse the repository at this point in the history
Better melos
  • Loading branch information
bartekpacia authored Jul 10, 2023
2 parents d63c264 + 48231e1 commit dacf177
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 55 deletions.
67 changes: 31 additions & 36 deletions melos.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
name: location
name: flutterlocation
repository: https://github.com/Lyokone/flutterlocation
packages:
- packages/**

scripts:
lint:all:
run: melos run analyze && melos run format
description: Run all static analysis checks
check:
run: |
melos run analyze
melos run format:dry-run
melos run test
melos run pub:dry-run
description: Run all static analysis checks.

analyze:
run: |
melos exec -c 5 -- \
dart analyze . --fatal-infos
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
run: melos exec -- \
dart analyze . --fatal-infos
description: Run `dart analyze` in all packages.
format:
run: melos exec -c 5 -- dart format .
description: |
Format all files.
run: melos exec -- \
dart format .
description: Run `dart format` in all packages.
format:dry-run:
run: melos exec -- \
dart format . --set-exit-if-changed
description: Run `dart format` in all packages, but don't make any changes.

pub:dry-run:
run: melos exec -- \
dart pub publish --dry-run
description: Run `dart pub publish` in all packages in dry run mode.
packageFilters:
ignore:
- 'example'

test:all:
run: melos run test --no-select && melos run test:mobile_e2e --no-select
run: melos run test --no-select
description: Run all tests available on stable channel

test:
run: |
melos exec -c 6 --fail-fast -- \
melos exec -- \
"flutter test --no-pub --coverage"
description: Run `flutter test` for a specific package.
select-package:
dir-exists:
packageFilters:
dirExists:
- test
ignore:
- "*web*"
- "*example*"

test:mobile_e2e:
run: |
melos exec -c 1 --fail-fast -- \
"flutter drive --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart"
description: |
Run all Android or iOS test driver e2e tests in a specific example app.
- Requires an Android emulator or iOS simulator.
select-package:
dir-exists:
- test_driver
scope: "*example*"
ignore:
- "*firebase_ml_custom*"
- "*firebase_ml_vision*"
- "*firebase_admob*"
4 changes: 2 additions & 2 deletions packages/location/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:example/change_settings.dart';
import 'package:example/enable_in_background.dart';
import 'package:flutter/material.dart';
import 'package:location/location.dart';
import 'package:location_example/change_settings.dart';
import 'package:location_example/enable_in_background.dart';
import 'package:url_launcher/url_launcher.dart';

import 'change_notification.dart';
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion packages/location/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: location_example
name: example
description: Demonstrates how to use the location plugin.

environment:
Expand Down
2 changes: 1 addition & 1 deletion packages/location/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ flutter:
dependencies:
flutter:
sdk: flutter
location_platform_interface: ^2.3.0
location_platform_interface: ^3.0.0
location_web: ^3.1.1
dev_dependencies:
async: ^2.5.0
Expand Down
2 changes: 1 addition & 1 deletion packages/location_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
http_parser: ^4.0.0
js: ^0.6.3
location_platform_interface: ^2.3.0
location_platform_interface: ^3.0.0
meta: ^1.3.0

dev_dependencies:
Expand Down
7 changes: 7 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: location_workspace

environment:
sdk: '>=2.18.0 <3.0.0'

dev_dependencies:
melos: ^3.1.0

0 comments on commit dacf177

Please sign in to comment.