Skip to content

Commit 5a83661

Browse files
authored
feat: upgrade dependencies and environment requirements (#375)
Updates Navigation SDK for Android from 6.2.0 to 6.2.2 Updates Navigation SDK for iOS from 9.4.0 to 10.0.0 Updates minimun Dart SDK version to ^3.7.0 Updates minimun Flutter version to >=3.29.0 Package upgrades: flutter_lints: ^4.0.0 -> ^5.0.0 mockito: 5.4.4 -> 5.4.6 pigeon: 15.0.0 -> 25.3.2 patrol: 3.14.1 -> 3.16.0 Updates example app to use Gradle's declarative plugins block. Re-formats the codebase with latest flutter formatter.
1 parent 42faf5b commit 5a83661

File tree

120 files changed

+24687
-20734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+24687
-20734
lines changed

.github/workflows/analyze.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
- name: Setup flutter
3434
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
3535
with:
36-
flutter-version: "3.27.x"
36+
flutter-version: "3.32.x"
3737
channel: "stable"
3838
cache: true
3939
- name: Setup melos
4040
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
4141
with:
42-
melos-version: "6.0.0"
42+
melos-version: "6.3.2"
4343
- name: "Run Flutter Analyze"
4444
run: melos run flutter-analyze
4545

@@ -57,13 +57,13 @@ jobs:
5757
- name: Setup flutter
5858
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
5959
with:
60-
flutter-version: "3.27.x"
60+
flutter-version: "3.32.x"
6161
channel: "stable"
6262
cache: true
6363
- name: Setup melos
6464
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
6565
with:
66-
melos-version: "6.0.0"
66+
melos-version: "6.3.2"
6767
- name: Restore Cache
6868
uses: actions/cache/restore@v4
6969
id: cache

.github/workflows/licence-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install Flutter
4242
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
4343
with:
44-
flutter-version: "3.27.x"
44+
flutter-version: "3.32.x"
4545
channel: "stable"
4646
cache: true
4747
- name: Install Melos
@@ -50,6 +50,6 @@ jobs:
5050
# Running `melos bootstrap` is not needed because we use Melos just
5151
# for the `check-license-header` script.
5252
run-bootstrap: false
53-
melos-version: "6.0.0"
53+
melos-version: "6.3.2"
5454
- name: Check license header
5555
run: melos run check-license-header

.github/workflows/test-and-build.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
4242
name: Setup flutter
4343
with:
44-
flutter-version: "3.27.x"
44+
flutter-version: "3.32.x"
4545
channel: "stable"
4646
cache: true
4747
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
4848
with:
49-
melos-version: "6.0.0"
49+
melos-version: "6.3.2"
5050
- name: "Run flutter test"
5151
run: melos run test:dart
5252

@@ -67,13 +67,13 @@ jobs:
6767
- name: Setup flutter
6868
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
6969
with:
70-
flutter-version: "3.27.x"
70+
flutter-version: "3.32.x"
7171
channel: "stable"
7272
cache: true
7373
- name: Setup melos
7474
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
7575
with:
76-
melos-version: "6.0.0"
76+
melos-version: "6.3.2"
7777
- name: "Run Android native unit tests"
7878
run: melos run test:android
7979
- name: Upload build artifact
@@ -97,27 +97,27 @@ jobs:
9797
- name: Setup flutter
9898
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
9999
with:
100-
flutter-version: "3.27.x"
100+
flutter-version: "3.32.x"
101101
channel: "stable"
102102
cache: true
103103
- name: Setup melos
104104
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
105105
with:
106-
melos-version: "6.0.0"
106+
melos-version: "6.3.2"
107107
- name: Cache podfiles
108108
uses: actions/cache@v4
109109
with:
110110
path: "**/Pods"
111111
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
112112
restore-keys: |
113113
${{ runner.os }}-pods-
114-
- name: Select XCode 16.1
115-
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
114+
- name: Select XCode 16.2
115+
run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer'
116116
- name: Generate necessary files with flutter build
117117
working-directory: ${{ env.working_directory }}
118118
run: flutter build ios --config-only
119119
- name: "Run iOS native unit tests"
120-
run: TEST_DEVICE='iPhone 16 Pro' TEST_OS='18.1' melos run test:ios
120+
run: TEST_DEVICE='iPhone 16 Pro' TEST_OS='18.2' melos run test:ios
121121
- name: Upload build artifact
122122
uses: actions/upload-artifact@v4
123123
with:
@@ -147,13 +147,13 @@ jobs:
147147
- name: Setup flutter
148148
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
149149
with:
150-
flutter-version: "3.27.x"
150+
flutter-version: "3.32.x"
151151
channel: "stable"
152152
cache: true
153153
- name: Setup melos
154154
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
155155
with:
156-
melos-version: "6.0.0"
156+
melos-version: "6.3.2"
157157
- name: Download Build Artifact
158158
uses: actions/download-artifact@v4
159159
with:
@@ -184,14 +184,14 @@ jobs:
184184
- name: Setup flutter
185185
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
186186
with:
187-
flutter-version: "3.27.x"
187+
flutter-version: "3.32.x"
188188
channel: "stable"
189189
cache: true
190190
architecture: x64
191191
- name: Setup melos
192192
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
193193
with:
194-
melos-version: "6.0.0"
194+
melos-version: "6.3.2"
195195
- name: Cache podfiles
196196
uses: actions/cache@v4
197197
with:
@@ -203,8 +203,8 @@ jobs:
203203
uses: actions/download-artifact@v4
204204
with:
205205
name: ${{ runner.os }}-build-artifact
206-
- name: Select XCode 16.1
207-
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
206+
- name: Select XCode 16.2
207+
run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer'
208208
- name: "Run build for iOS"
209209
run: melos run flutter-build-ios
210210
- name: Upload build artifact
@@ -260,7 +260,7 @@ jobs:
260260
- name: Setup flutter
261261
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
262262
with:
263-
flutter-version: "3.27.x"
263+
flutter-version: "3.32.x"
264264
channel: "stable"
265265
cache: true
266266
- name: Download Build Artifact
@@ -328,11 +328,11 @@ jobs:
328328
- name: Setup flutter
329329
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
330330
with:
331-
flutter-version: "3.27.x"
331+
flutter-version: "3.32.x"
332332
channel: "stable"
333333
cache: true
334-
- name: Select XCode 16.1
335-
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
334+
- name: Select XCode 16.2
335+
run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer'
336336
- name: Start iOS simulator
337337
run: |
338338
SIMULATOR_NAME="iPhone 16 Pro"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ To run unit tests on iOS, follow these steps:
122122
Or to run the iOS unit tests from command line, call
123123

124124
```bash
125-
TEST_DEVICE='iPhone 16 Pro' TEST_OS="18.1" melos run test:ios
125+
TEST_DEVICE='iPhone 16 Pro' TEST_OS="18.5" melos run test:ios
126126
```
127127

128128
Specify the device you want to run the tests on with the DEVICE env variable.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This repository contains a Flutter plugin that provides a [Google Navigation](ht
1111

1212
| | Android | iOS |
1313
| ------------------------------- | ------------- | --------- |
14-
| **Minimum mobile OS supported** | API level 23+ | iOS 15.0+ |
14+
| **Minimum mobile OS supported** | API level 23+ | iOS 16.0+ |
1515

1616
* A Flutter project
1717
* A Google Cloud project
@@ -34,17 +34,17 @@ flutter pub add google_navigation_flutter
3434

3535
### Android
3636

37-
Set the `minSdkVersion` in `android/app/build.gradle`:
37+
Set the `minSdk` in `android/app/build.gradle`:
3838

3939
```groovy
4040
android {
4141
defaultConfig {
42-
minSdkVersion 23
42+
minSdk 23
4343
}
4444
}
4545
```
4646

47-
If `minSdkVersion` is set to less than 34 (API 34), you need to configure desugaring for your Android app.
47+
If `minSdk` is set to less than 34 (API 34), you need to configure desugaring for your Android app.
4848
To enable desugaring, add the following configurations to `android/app/build.gradle` file:
4949
```groovy
5050
android {
@@ -66,8 +66,8 @@ dependencies {
6666
2. Add the following lines to the beginning of this Podfile:
6767

6868
```
69-
# Set platform to 15.0 to enable latest Google Maps SDK
70-
platform :ios, '15.0'
69+
# Set platform to 16.0 to enable latest Google Maps SDK
70+
platform :ios, '16.0'
7171
```
7272
3. In Xcode open Info.plist file and add `App registers for location updates` to the list of `Required background modes`
7373

android/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ buildscript {
2020
repositories {
2121
google()
2222
mavenCentral()
23-
maven { url "https://plugins.gradle.org/m2/" }
23+
maven { url 'https://plugins.gradle.org/m2/' }
2424
}
2525

2626
dependencies {
27-
classpath 'com.android.tools.build:gradle:8.4.0'
27+
classpath 'com.android.tools.build:gradle:8.7.3'
2828
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2929
classpath 'com.ncorti.ktfmt.gradle:plugin:0.21.0'
3030
}
@@ -53,15 +53,15 @@ ktfmt {
5353
android {
5454
namespace 'com.google.maps.flutter.navigation'
5555

56-
compileSdk 34
56+
compileSdk = 35
5757

5858
compileOptions {
5959
sourceCompatibility JavaVersion.VERSION_11
6060
targetCompatibility JavaVersion.VERSION_11
6161
}
6262

6363
kotlinOptions {
64-
jvmTarget = '11'
64+
jvmTarget = JavaVersion.VERSION_11
6565
}
6666

6767
sourceSets {
@@ -70,18 +70,18 @@ android {
7070
}
7171

7272
defaultConfig {
73-
minSdkVersion 23
73+
minSdk = 23
7474
consumerProguardFiles 'proguard.txt'
7575
}
7676

7777
dependencies {
78-
implementation "androidx.car.app:app:1.4.0"
79-
implementation "androidx.car.app:app-projected:1.4.0"
80-
implementation "com.google.android.libraries.navigation:navigation:6.2.0"
78+
implementation 'androidx.car.app:app:1.4.0'
79+
implementation 'androidx.car.app:app-projected:1.4.0'
80+
implementation 'com.google.android.libraries.navigation:navigation:6.2.2'
8181
testImplementation 'org.jetbrains.kotlin:kotlin-test'
8282
testImplementation 'io.mockk:mockk:1.13.8'
8383
testImplementation 'junit:junit:4.13.2'
84-
testImplementation 'org.robolectric:robolectric:4.9'
84+
testImplementation 'org.robolectric:robolectric:4.14.1'
8585
}
8686

8787
testOptions {
@@ -90,7 +90,7 @@ android {
9090
}
9191
unitTests.all {
9292
testLogging {
93-
events "passed", "skipped", "failed", "standardOut", "standardError"
93+
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
9494
outputs.upToDateWhen {false}
9595
showStandardStreams = true
9696
}

android/src/main/kotlin/com/google/maps/flutter/navigation/AndroidAutoBaseScreen.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ open class AndroidAutoBaseScreen(carContext: CarContext) :
5555

5656
private fun initializeNavigationListener() {
5757
GoogleMapsNavigationSessionManager.navigationReadyListener = this
58-
try {
59-
mIsNavigationReady = GoogleMapsNavigationSessionManager.getInstance().isInitialized()
60-
} catch (exception: RuntimeException) {
61-
// If GoogleMapsNavigationSessionManager is not initialized navigation is not ready.
62-
mIsNavigationReady = false
63-
}
58+
mIsNavigationReady =
59+
try {
60+
GoogleMapsNavigationSessionManager.getInstance().isInitialized()
61+
} catch (exception: RuntimeException) {
62+
// If GoogleMapsNavigationSessionManager is not initialized navigation is not ready.
63+
false
64+
}
6465
}
6566

6667
private fun initializeSurfaceCallback() {

0 commit comments

Comments
 (0)