File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,13 +12,20 @@ perl -0pi -e "s/id \"com\.android\.application\" version \"[^\"]+\" apply false/
1212perl -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.
1723perl -0pi -e ' s/\n\s*id "kotlin-android"\n/\n/' " $TEST_ANDROID_DIR /app/build.gradle"
1824perl -0pi -e ' s/\n\s*kotlinOptions \{\n\s*jvmTarget = JavaVersion\.VERSION_17\n\s*\}\n/\n/' " $TEST_ANDROID_DIR /app/build.gradle"
1925
2026grep -q " id \" com.android.application\" version \" $AGP_VERSION \" apply false" " $TEST_ANDROID_DIR /settings.gradle"
2127grep -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
You can’t perform that action at this time.
0 commit comments