Skip to content
Merged
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
53 changes: 30 additions & 23 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,65 +28,72 @@ jobs:
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.32.x"
flutter-version: "3.38.x"
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
melos-version: "6.3.2"
- name: "Run Flutter Analyze"
run: melos run flutter-analyze

format:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/setup-java@v4
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.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
id: cache
with:
path: /home/linuxbrew/.linuxbrew
key: ${{ runner.os }}-linuxbrew
- uses: Homebrew/actions/setup-homebrew@master
- name: Install swift-format 600.0.0
#if: steps.cache.outputs.cache-hit != 'true'
- name: Install swift-format 602.0.0
if: steps.cache.outputs.cache-hit != 'true'
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/402e262f48947bad849ea7793752ff16b7038406/Formula/s/swift-format.rb
echo 'brew "swift-format.rb"' > Brewfile
brew bundle
brew install swift-format
- name: Save Cache
uses: actions/cache/save@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: /home/linuxbrew/.linuxbrew
key: ${{ runner.os }}-linuxbrew
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
flutter-version: "3.32.x"
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
- name: "Formatter version"
- name: Print swift-format version
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
swift-format --version
- name: "Run format"
- name: Run format
if: ${{ success() || failure() }}
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
melos run format
- name: "Validate formatting"
- name: Validate formatting
if: ${{ success() || failure() }}
run: |
./.github/workflows/scripts/validate-formatting.sh
112 changes: 68 additions & 44 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,81 +25,96 @@ concurrency:

jobs:
test-dart:
name: Run dart unit tests
timeout-minutes: 45
runs-on:
labels: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/setup-java@v4
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.32.x"
flutter-version: "3.38.x"
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
melos-version: "6.3.2"
- name: "Run flutter test"
run: melos run test:dart

test-android:
name: Run Android native unit tests
timeout-minutes: 45
runs-on:
labels: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/setup-java@v4
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.32.x"
flutter-version: "3.38.x"
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
melos-version: "6.3.2"
- name: "Run Android native unit tests"
run: melos run test:android

test-ios:
name: Run iOS native unit tests
timeout-minutes: 45
runs-on:
labels: macos-latest-xlarge
strategy:
matrix:
working_directory: ["example"]
env:
working_directory: "example"
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/cache@v4
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.38.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
with:
path: "**/Pods"
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
flutter-version: "3.32.x"
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
- name: Select XCode 16.1
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
- name: Select XCode 26.3
run: sudo xcode-select -s '/Applications/Xcode_26.3.0.app/Contents/Developer'
- name: Generate necessary files with flutter build
working-directory: ${{ matrix.working_directory }}
run: flutter build ios --config-only
working-directory: ${{ env.working_directory }}
run: flutter build ios --config-only --simulator
- name: "Run iOS native unit tests"
run: TEST_DEVICE='iPhone 16 Pro' TEST_OS='18.1' melos run test:ios
run: TEST_DEVICE='iPhone 16 Pro' TEST_OS='26.2' melos run test:ios

build-android:
name: Build Android
needs: [test-dart, test-android, test-ios]
if: contains(github.base_ref, 'main')
timeout-minutes: 45
Expand All @@ -108,48 +123,57 @@ jobs:
env:
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/setup-java@v4
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.32.x"
flutter-version: "3.38.x"
channel: "stable"
cache: true
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
melos-version: "6.3.2"
- name: "Run build for Android"
run: melos run flutter-build-android

build-ios:
name: Build iOS
needs: [test-dart, test-android, test-ios]
if: contains(github.base_ref, 'main')
timeout-minutes: 90
runs-on: macos-latest-xlarge
env:
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.32.x"
flutter-version: "3.38.x"
channel: "stable"
cache: true
architecture: x64
- uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
- name: Setup melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
with:
melos-version: "6.0.0"
- uses: actions/cache@v4
melos-version: "6.3.2"
- name: Cache podfiles
uses: actions/cache@v4
with:
path: "**/Pods"
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Select XCode 16.1
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
- name: Select XCode 26.3
run: sudo xcode-select -s '/Applications/Xcode_26.3.0.app/Contents/Developer'
- name: "Run build for iOS"
run: melos run flutter-build-ios
15 changes: 9 additions & 6 deletions .github/workflows/licence-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
with:
go-version: "^1.13.1"
# Go is used by addlicense command (addlicense is used in melos run
# check-license-header)
- run: go install github.com/google/addlicense@latest
- name: Run addlicense
run: go install github.com/google/addlicense@latest
- name: Install Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
flutter-version: "3.32.x"
flutter-version: "3.38.x"
channel: "stable"
cache: true
- name: Install Melos
Expand All @@ -47,6 +50,6 @@ jobs:
# Running `melos bootstrap` is not needed because we use Melos just
# for the `check-license-header` script.
run-bootstrap: false
melos-version: "6.0.0"
melos-version: "6.3.2"
- name: Check license header
run: melos run check-license-header
4 changes: 3 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@d1a8f221d7723166f48a584aebba00ef3f6febec
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ Pods/
**/Flutter/flutter_assets/
ServiceDefinitions.json
xcuserdata/
.swiftpm/
.last_build_id
.build/

# Android
local.properties
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#cod
- **Operating System:** Linux, macOS, or Windows.
- **Version Control:** [git](https://git-scm.com).
- **Development Environment:** An IDE such as [Android Studio](https://developer.android.com/studio) or [Visual Studio Code](https://code.visualstudio.com/).
- **Code Formatting:** [`swift-format`](https://formulae.brew.sh/formula/swift-formatt).
- **Code Formatting:** [`swift-format`](https://formulae.brew.sh/formula/swift-format).

### 1.1. Installing swift-format
The CI is locked to swift-format 600.0.0 version which you can install with the command below:
The CI is locked to swift-format 602.0.0 which you can install with the command below:
```bash
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/402e262f48947bad849ea7793752ff16b7038406/Formula/s/swift-format.rb
brew install swift-format.rb
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ This repository contains a Flutter plugin that allows users to use the [Google M

## Requirements

| | Android | iOS |
| ----------- | ------- | --------- |
| **Support** | SDK 23+ | iOS 16.0+ |
| | Android | iOS |
| ------------------------------- | ------- | --------- |
| **Minimum mobile OS supported** | SDK 26+ | iOS 16.0+ |
| **Compile/Target SDK** | SDK 36+ | - |

* A Flutter project
* 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
* If targeting Android, [Google Play Services](https://developers.google.com/android/guides/overview) installed and enabled
* If targeting iOS, Xcode 26 or later is required
* [Attributions and licensing text](https://developers.google.com/maps/documentation/navigation/android-sdk/set-up-project#include_the_required_attributions_in_your_app) added to your app


Expand Down
Loading
Loading