Skip to content

Commit

Permalink
Merge branch 'main' into web-tests-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom authored Jan 31, 2024
2 parents 1ba58a8 + 18a0b21 commit cbcb463
Show file tree
Hide file tree
Showing 41 changed files with 475 additions and 118 deletions.
190 changes: 190 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "mvanbeusekom"
labels:
- "platform: ci"

- package-ecosystem: "gradle"
directory: "/geolocator_android/android"
commit-message:
prefix: "[geolocator_android]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10
ignore:
- dependency-name: "com.android.tools.build:gradle"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
- dependency-name: "junit:junit"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
- dependency-name: "org.mockito:*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
- dependency-name: "androidx.test:*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: "gradle"
directory: "/geolocator_android/example/android/app"
commit-message:
prefix: "[geolocator_android]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: "gradle"
directory: "/geolocator/example/android/app"
commit-message:
prefix: "[geolocator]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: "pub"
directory: "/geolocator"
commit-message:
prefix: "[geolocator]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator/example"
commit-message:
prefix: "[geolocator]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_android"
commit-message:
prefix: "[geolocator_android]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_android/example"
commit-message:
prefix: "[geolocator_android]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_apple"
commit-message:
prefix: "[geolocator_apple]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_apple/example"
commit-message:
prefix: "[geolocator_apple]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_linux"
commit-message:
prefix: "[geolocator_linux]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_linux/example"
commit-message:
prefix: "[geolocator_linux]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_platform_interface"
commit-message:
prefix: "[geolocator_platform_interface]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_web"
commit-message:
prefix: "[geolocator_web]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_web/example"
commit-message:
prefix: "[geolocator_web]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_windows"
commit-message:
prefix: "[geolocator_windows]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geolocator_windows/example"
commit-message:
prefix: "[geolocator_windows]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10
13 changes: 2 additions & 11 deletions .github/workflows/geolocator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Ensures JAVA 11 is installed on the build agent.
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
Expand Down Expand Up @@ -71,12 +71,3 @@ jobs:
- name: Run unit tests
run: flutter test --coverage
working-directory: ${{env.source-directory}}

# Upload code coverage information
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{env.source-directory}}/coverage/lcov.info # optional
name: geolocator (App Facing Package) # optional
flags: unittests # optional
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions .github/workflows/geolocator_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Ensures JAVA 17 is installed on the build agent.
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/geolocator_apple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v2
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/geolocator_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -65,10 +65,3 @@ jobs:
- name: Run unit tests
run: flutter test --coverage
working-directory: ${{env.source-directory}}

# Upload code coverage information
- uses: codecov/codecov-action@v1
with:
file: ${{env.source-directory}}/coverage/lcov.info # optional
name: geolocator_linux (Linux Platform Package) # optional
fail_ci_if_error: true
9 changes: 1 addition & 8 deletions .github/workflows/geolocator_platform_interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v2
Expand All @@ -54,10 +54,3 @@ jobs:
- name: Run unit tests
run: flutter test --coverage
working-directory: ${{env.source-directory}}

# Upload code coverage information
- uses: codecov/codecov-action@v1
with:
file: ${{env.source-directory}}/coverage/lcov.info # optional
name: geolocator_platform_interface (Platform Interface Package) # optional
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/geolocator_web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/geolocator_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/no-response.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# the `status: needs more info` label, the issue should be closed automatically.
# 5. Set the `close-issue-message` parameter with a text that will be placed as a comment to the respective issue that
# is closed to explain why the issue was closed.
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-label: 'status: needs more info'
days-before-stale: -1
Expand Down
24 changes: 12 additions & 12 deletions geolocator/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GeolocatorWidget extends StatefulWidget {
}

@override
_GeolocatorWidgetState createState() => _GeolocatorWidgetState();
State<GeolocatorWidget> createState() => _GeolocatorWidgetState();
}

class _GeolocatorWidgetState extends State<GeolocatorWidget> {
Expand Down Expand Up @@ -76,26 +76,26 @@ class _GeolocatorWidgetState extends State<GeolocatorWidget> {
itemBuilder: (context) => [
if (Platform.isIOS)
const PopupMenuItem(
child: Text("Get Location Accuracy"),
value: 1,
child: Text("Get Location Accuracy"),
),
if (Platform.isIOS)
const PopupMenuItem(
child: Text("Request Temporary Full Accuracy"),
value: 2,
child: Text("Request Temporary Full Accuracy"),
),
const PopupMenuItem(
child: Text("Open App Settings"),
value: 3,
child: Text("Open App Settings"),
),
if (Platform.isAndroid || Platform.isWindows)
const PopupMenuItem(
child: Text("Open Location Settings"),
value: 4,
child: Text("Open Location Settings"),
),
const PopupMenuItem(
child: Text("Clear"),
value: 5,
child: Text("Clear"),
),
],
);
Expand Down Expand Up @@ -151,10 +151,6 @@ class _GeolocatorWidgetState extends State<GeolocatorWidget> {
mainAxisAlignment: MainAxisAlignment.end,
children: [
FloatingActionButton(
child: (_positionStreamSubscription == null ||
_positionStreamSubscription!.isPaused)
? const Icon(Icons.play_arrow)
: const Icon(Icons.pause),
onPressed: () {
positionStreamStarted = !positionStreamStarted;
_toggleListening();
Expand All @@ -165,16 +161,20 @@ class _GeolocatorWidgetState extends State<GeolocatorWidget> {
? 'Resume'
: 'Pause',
backgroundColor: _determineButtonColor(),
child: (_positionStreamSubscription == null ||
_positionStreamSubscription!.isPaused)
? const Icon(Icons.play_arrow)
: const Icon(Icons.pause),
),
sizedBox,
FloatingActionButton(
child: const Icon(Icons.my_location),
onPressed: _getCurrentPosition,
child: const Icon(Icons.my_location),
),
sizedBox,
FloatingActionButton(
child: const Icon(Icons.bookmark),
onPressed: _getLastKnownPosition,
child: const Icon(Icons.bookmark),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion geolocator/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.4
flutter_lints: ^3.0.1

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
2 changes: 1 addition & 1 deletion geolocator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.4
flutter_lints: ^3.0.1
mockito: ^5.0.0-nullsafety.7
plugin_platform_interface: ^2.0.0
Loading

0 comments on commit cbcb463

Please sign in to comment.