Skip to content

Commit 15ac862

Browse files
committed
update
1 parent 5e7cb8c commit 15ac862

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/scripts/agp9-compatibility.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ perl -0pi -e "s/id \"com\.android\.application\" version \"[^\"]+\" apply false/
1212
perl -0pi -e "s#distributionUrl=https\\\\://services.gradle.org/distributions/gradle-[^-]+-all.zip#distributionUrl=https\\\\://services.gradle.org/distributions/gradle-$GRADLE_VERSION-all.zip#" \
1313
"$TEST_ANDROID_DIR/gradle/wrapper/gradle-wrapper.properties"
1414

15+
# Flutter's Gradle plugin does not fully support AGP 9's new DSL yet. Opt out in
16+
# this CI-only checkout so the job validates FlutterFire plugin compatibility.
17+
# https://docs.flutter.cn/release/breaking-changes/migrate-to-agp-9/
18+
grep -q '^android.newDsl=false$' "$TEST_ANDROID_DIR/gradle.properties" || \
19+
printf '\nandroid.newDsl=false\n' >> "$TEST_ANDROID_DIR/gradle.properties"
20+
1521
# AGP 9 has built-in Kotlin support. Keep the compatibility check focused on
1622
# FlutterFire plugins by applying the same migration to the test app at runtime.
1723
perl -0pi -e 's/\n\s*id "kotlin-android"\n/\n/' "$TEST_ANDROID_DIR/app/build.gradle"
1824
perl -0pi -e 's/\n\s*kotlinOptions \{\n\s*jvmTarget = JavaVersion\.VERSION_17\n\s*\}\n/\n/' "$TEST_ANDROID_DIR/app/build.gradle"
1925

2026
grep -q "id \"com.android.application\" version \"$AGP_VERSION\" apply false" "$TEST_ANDROID_DIR/settings.gradle"
2127
grep -q "gradle-$GRADLE_VERSION-all.zip" "$TEST_ANDROID_DIR/gradle/wrapper/gradle-wrapper.properties"
28+
grep -q '^android.newDsl=false$' "$TEST_ANDROID_DIR/gradle.properties"
2229
! grep -q 'id "kotlin-android"' "$TEST_ANDROID_DIR/app/build.gradle"
2330
! grep -q 'kotlinOptions' "$TEST_ANDROID_DIR/app/build.gradle"
2431

0 commit comments

Comments
 (0)