Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
branches:
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -33,7 +36,7 @@ jobs:
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Setup melos
Expand All @@ -50,23 +53,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.3.2"
- name: Restore Cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: cache
with:
path: /home/linuxbrew/.linuxbrew
Expand All @@ -78,7 +81,7 @@ jobs:
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew install swift-format
- name: Save Cache
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: /home/linuxbrew/.linuxbrew
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
branches:
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -39,15 +42,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Setup melos
Expand All @@ -66,15 +69,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Setup melos
Expand All @@ -98,15 +101,15 @@ jobs:
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.3.2"
- name: Cache podfiles
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: "**/Pods"
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
Expand All @@ -133,15 +136,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Setup melos
Expand All @@ -165,7 +168,7 @@ jobs:
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
architecture: x64
Expand All @@ -174,7 +177,7 @@ jobs:
with:
melos-version: "6.3.2"
- name: Cache podfiles
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: "**/Pods"
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/licence-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
branches:
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -41,7 +44,7 @@ jobs:
- name: Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.x"
flutter-version: "3.44.x"
channel: "stable"
cache: true
- name: Install Melos
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ build/
**/doc/api/

# iOS
Podfile.lock
Pods/
.symlinks/
**/Flutter/ephemeral/
**/Flutter/Flutter.podspec
**/Flutter/App.framework/
**/Flutter/Flutter.framework/
**/Flutter/Generated.xcconfig
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ Specify the device you want to run the tests on with the DEVICE env variable.
Integration tests are responsible for ensuring that the plugin works against the native Driver SDK for both Android and iOS platforms. Patrol is used for the integration tests to simplify interactions with native elements. To use patrol, you first need to activate the patrol_cli.

```bash
flutter pub global activate patrol_cli 4.4.0
flutter pub global activate patrol_cli 4.7.0
```

Patrol 4.9.0 requires Patrol CLI 4.7.0 or later, which supports this project's Swift Package Manager setup. See the [Patrol compatibility table](https://patrol.leancode.co/documentation/compatibility-table) when updating either dependency.

To ensure that all necessary dependencies for patrol are properly set up, run the following command:

```bash
Expand Down
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This repository contains a Flutter plugin that allows users to use the [Google M
| **Minimum mobile OS supported** | SDK 26+ | iOS 16.0+ |
| **Compile/Target SDK** | SDK 36+ | - |

* A Flutter project
* A Flutter project using Flutter 3.44 or later
* A Google Cloud project with the [Navigation SDK enabled](https://developers.google.com/maps/documentation/navigation/android-sdk/set-up-project), the [Maps SDK for iOS enabled](https://developers.google.com/maps/documentation/navigation/ios-sdk/config) and the [Local Rides and Deliveries API enabled](https://console.developers.google.com/apis/library/fleetengine.googleapis.com)
* A Google Maps API key from the project above
* Project ID for the project above
Expand All @@ -29,6 +29,35 @@ This repository contains a Flutter plugin that allows users to use the [Google M
> [!IMPORTANT]
> Project ID need to be allowlisted before using this plugin. Please contact your Google representative to get your Project ID allowlisted.

### Android build requirements

The Android Navigation SDK used by `google_navigation_flutter` 0.10.0 requires:

* Android Gradle Plugin (AGP) 8.13.2 or newer.
* Core library desugaring enabled, using `com.android.tools:desugar_jdk_libs_nio:2.1.5` or newer.

Update the existing AGP declaration in `android/settings.gradle.kts`:

```kotlin
plugins {
id("com.android.application") version "8.13.2" apply false
}
```

Enable desugaring and update its dependency in `android/app/build.gradle.kts`, retaining your other build settings:

```kotlin
android {
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
}

dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs_nio:2.1.5")
}
```

## Installation

1. This repository is currently private. You will need to add the package dependency using [Git with SSH](https://docs.flutter.dev/packages-and-plugins/using-packages#dependencies-on-unpublished-packages) in the app's `pubspec.yaml` file. See [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh) for instructions on how to provide SSH keys.
Expand All @@ -40,7 +69,9 @@ This repository contains a Flutter plugin that allows users to use the [Google M
url: git@github.com:googlemaps/flutter-driver-sdk.git
```

2. Follow the instructions at the `google_navigation_flutter` plugin Readme to add your API key to the appropriate files in your Flutter project.
2. On iOS, this plugin requires Swift Package Manager; CocoaPods is not supported. Enable SwiftPM by following Flutter's [Swift Package Manager guide for app developers](https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers).

3. Follow the instructions at the `google_navigation_flutter` plugin Readme to add your API key to the appropriate files in your Flutter project.

[Google Maps Navigation Installation](https://github.com/googlemaps/flutter-navigation-sdk/blob/main/README.md#installation)

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ project.extensions.configure(org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjec
}

dependencies {
implementation("com.google.android.libraries.mapsplatform.transportation:transportation-driver:7.0.0")
implementation("com.google.android.libraries.mapsplatform.transportation:transportation-driver:7.1.0")
implementation("androidx.startup:startup-runtime:1.2.0")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("io.mockk:mockk:1.13.9")
Expand Down
7 changes: 0 additions & 7 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ To run the example app, follow these steps:
```
If you want to run the example app with a specific API key, see the [Setting up API Keys](#setting-up-api-keys) section.

> [!TIP](Pod-related issues on iOS)
> If you encounter pod-related issues when running the example code on iOS, you can try running the following commands from the `example/ios` folder:
> - pod repo update
> - pod install
>
> These commands will update and install the required pod files specifically for iOS.

### Dart defines

Supported dart define values and their default values:
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ flutter {
}

dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs_nio:2.0.4")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs_nio:2.1.5")
androidTestUtil("androidx.test:orchestrator:1.5.1")
}

Expand Down
4 changes: 4 additions & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
2 changes: 1 addition & 1 deletion example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.13.0" apply false
id("com.android.application") version "8.13.2" apply false
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "2.0.1" apply false
}
Expand Down
2 changes: 0 additions & 2 deletions example/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Expand Down
1 change: 0 additions & 1 deletion example/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 0 additions & 1 deletion example/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
Loading
Loading