Flip the newDsl default: drop the opt-out from templates and migrate it away - #10
Open
reidbaker-agent wants to merge 1 commit into
Open
Flip the newDsl default: drop the opt-out from templates and migrate it away#10reidbaker-agent wants to merge 1 commit into
reidbaker-agent wants to merge 1 commit into
Conversation
reidbaker-agent
force-pushed
the
agp-newdsl-flip
branch
from
July 22, 2026 15:54
1c7628d to
90e7f64
Compare
reidbaker-agent
force-pushed
the
agp-aar-script
branch
2 times, most recently
from
July 28, 2026 13:36
4b3f4e5 to
594f593
Compare
reidbaker-agent
force-pushed
the
agp-newdsl-flip
branch
from
July 28, 2026 13:36
90e7f64 to
e677b61
Compare
reidbaker-agent
force-pushed
the
agp-aar-script
branch
from
July 28, 2026 13:37
594f593 to
2e64d7a
Compare
reidbaker-agent
force-pushed
the
agp-newdsl-flip
branch
from
July 28, 2026 13:37
e677b61 to
0469863
Compare
reidbaker-agent
force-pushed
the
agp-aar-script
branch
from
July 29, 2026 20:22
2e64d7a to
bb22914
Compare
reidbaker-agent
force-pushed
the
agp-newdsl-flip
branch
from
July 29, 2026 20:23
0469863 to
0c85338
Compare
reidbaker-agent
force-pushed
the
agp-aar-script
branch
from
July 29, 2026 20:45
bb22914 to
65bafb0
Compare
reidbaker-agent
force-pushed
the
agp-newdsl-flip
branch
from
July 29, 2026 20:45
0c85338 to
45274d4
Compare
reidbaker-agent
force-pushed
the
agp-aar-script
branch
from
July 30, 2026 21:59
65bafb0 to
39f0c33
Compare
reidbaker-agent
force-pushed
the
agp-newdsl-flip
branch
2 times, most recently
from
July 31, 2026 16:16
a850013 to
aae8462
Compare
reidbaker-agent
force-pushed
the
agp-aar-script
branch
from
July 31, 2026 16:16
39f0c33 to
89849d6
Compare
…it away Phase P9 of the AGP public-API migration (flutter#180137, flutter#166550) - the breaking-change PR. The Flutter Gradle Plugin is public-API-only since P7/P8, so projects no longer need android.newDsl=false: - The app and module gradle.properties templates no longer ship the newDsl opt-out (android.builtInKotlin=false stays; it belongs to the separate built-in Kotlin migration). - DisableNewDslMigration is replaced by RemoveNewDslOptOutMigration, which removes exactly the line pairs Flutter wrote: one of the two known marker comments ('added by the Flutter template' / 'added automatically by Flutter migrator') immediately followed by android.newDsl=false. The removal is anchored on the android.newDsl property line, so the adjacent builtInKotlin marker/flag lines are never touched; hand-added opt-outs and developer-edited values are respected; the file the old migrator created with only the flag is emptied. A visible status message names the change and links the breaking-change page. - New legacyVariantApiUsageErrorHandler matches the Gradle failures users hit when their build scripts use the removed legacy variant API (unknown property/method applicationVariants, libraryVariants, testVariants, variantFilter) and prints problem, cause, fix (androidComponents.onVariants), the breaking-change page URL, and the android.newDsl=false escape hatch with its AGP 10 expiry. useNewAgpDslErrorHandler is retired: its signature was the FGP's own legacy DSL access failing under newDsl, which can no longer happen. - kNewDslBreakingChangeDocsUrl pins the docs.flutter.dev page location; the in-repo website-page draft records that the page must be published at that exact path before this reaches beta. - The migration doc records the stable-channel release-management step (guard or accept the add-migrator flip-flop during the overlap window). Verified here: android_project_migration_test.dart (42/42) and gradle_errors_test.dart (56/56) pass with the repo Dart SDK; dart analyze clean on the changed files. CI preconditions before this ships: full newDsl=true matrix green (R6), website page live, top-25 pub.dev plugin scratch-app sweep under -Pandroid.newDsl=true, and GradleHandledError eventLabel hit-rate monitoring during the beta soak as the stable go/no-go signal. Cleanly revertible in isolation.
reidbaker
force-pushed
the
agp-newdsl-flip
branch
from
July 31, 2026 18:07
aae8462 to
7b8bdf1
Compare
reidbaker
force-pushed
the
agp-aar-script
branch
from
July 31, 2026 18:07
89849d6 to
4a8e3a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 10 of 11 of the AGP public-API migration; stacked on #9.
Phase P9 of the AGP public-API migration (flutter#180137,
flutter#166550) - the breaking-change PR. The Flutter Gradle
Plugin is public-API-only since P7/P8, so projects no longer need
android.newDsl=false:
newDsl opt-out (android.builtInKotlin=false stays; it belongs to the
separate built-in Kotlin migration).
which removes exactly the line pairs Flutter wrote: one of the two
known marker comments ('added by the Flutter template' / 'added
automatically by Flutter migrator') immediately followed by
android.newDsl=false. The removal is anchored on the android.newDsl
property line, so the adjacent builtInKotlin marker/flag lines are
never touched; hand-added opt-outs and developer-edited values are
respected; the file the old migrator created with only the flag is
emptied. A visible status message names the change and links the
breaking-change page.
users hit when their build scripts use the removed legacy variant API
(unknown property/method applicationVariants, libraryVariants,
testVariants, variantFilter) and prints problem, cause, fix
(androidComponents.onVariants), the breaking-change page URL, and the
android.newDsl=false escape hatch with its AGP 10 expiry.
useNewAgpDslErrorHandler is retired: its signature was the FGP's own
legacy DSL access failing under newDsl, which can no longer happen.
the in-repo website-page draft records that the page must be
published at that exact path before this reaches beta.
(guard or accept the add-migrator flip-flop during the overlap
window).
Verified here: android_project_migration_test.dart (42/42) and
gradle_errors_test.dart (56/56) pass with the repo Dart SDK; dart
analyze clean on the changed files. CI preconditions before this ships:
full newDsl=true matrix green (R6), website page live, top-25 pub.dev
plugin scratch-app sweep under -Pandroid.newDsl=true, and
GradleHandledError eventLabel hit-rate monitoring during the beta soak
as the stable go/no-go signal.
Cleanly revertible in isolation.
CI must run the FGP unit tests (the Kotlin suite in packages/flutter_tools/gradle could not run in the delivery sandbox: dl.google.com returns 403, so AGP artifacts do not resolve).