Skip to content

Commit 02b84e7

Browse files
authored
Fix CI/CD build failures (#7)
Fixes build failures in the "test-and-build" GitHub workflow: - Android and iOS artifacts not found - Higher NDK version required than what's default by Flutter - Use of a specific checkout version (not needed) - Gradle version too low for current version of Flutter
1 parent ddf3cf8 commit 02b84e7

File tree

3 files changed

+6
-28
lines changed

3 files changed

+6
-28
lines changed

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

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on:
3131
labels: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
33+
- uses: actions/checkout@v4
3434
name: Checkout code
3535
- uses: actions/setup-java@v4
3636
name: Setup java
@@ -61,7 +61,7 @@ jobs:
6161
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
6262
steps:
6363
- name: Checkout code
64-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
64+
uses: actions/checkout@v4
6565
- name: Setup java
6666
uses: actions/setup-java@v4
6767
with:
@@ -78,20 +78,8 @@ jobs:
7878
uses: bluefireteam/melos-action@ec2c512a52c2f359186ca19bac0be977c44913e6
7979
with:
8080
melos-version: "6.0.0"
81-
- name: Download Build Artifact
82-
uses: actions/download-artifact@v4
83-
with:
84-
name: ${{ runner.os }}-build-artifact
8581
- name: "Run build for Android"
8682
run: melos run flutter-build-android
87-
- name: Upload build artifact
88-
uses: actions/upload-artifact@v4
89-
with:
90-
name: ${{ runner.os }}-build-artifact
91-
include-hidden-files: true
92-
path: build
93-
retention-days: 1
94-
overwrite: true
9583

9684
build-ios:
9785
name: Build iOS
@@ -123,19 +111,7 @@ jobs:
123111
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
124112
restore-keys: |
125113
${{ runner.os }}-pods-
126-
- name: Download Build Artifact
127-
uses: actions/download-artifact@v4
128-
with:
129-
name: ${{ runner.os }}-build-artifact
130114
- name: Select XCode 16.1
131115
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
132116
- name: "Run build for iOS"
133117
run: melos run flutter-build-ios
134-
- name: Upload build artifact
135-
uses: actions/upload-artifact@v4
136-
with:
137-
name: ${{ runner.os }}-build-artifact
138-
include-hidden-files: true
139-
path: build
140-
retention-days: 1
141-
overwrite: true

android/app/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ plugins {
2222
android {
2323
namespace = "com.example.flutter_maps_samples"
2424
compileSdk = flutter.compileSdkVersion
25-
ndkVersion = flutter.ndkVersion
25+
// The Google Maps plugin needs a higher version of NDK than
26+
// Flutter's default (flutter.ndkVersion).
27+
ndkVersion = "27.0.12077973"
2628

2729
compileOptions {
2830
sourceCompatibility = JavaVersion.VERSION_17

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip

0 commit comments

Comments
 (0)