Delete getLegacyAndroidExtension and migrate the NDK fallback to the public DSL - #5
Open
reidbaker-agent wants to merge 1 commit into
Open
Delete getLegacyAndroidExtension and migrate the NDK fallback to the public DSL#5reidbaker-agent wants to merge 1 commit into
reidbaker-agent wants to merge 1 commit into
Conversation
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 22, 2026 15:54
fd41f02 to
dc99bbd
Compare
reidbaker-agent
force-pushed
the
agp-ndk-fallback
branch
from
July 22, 2026 15:54
03a8311 to
7e60b17
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 28, 2026 13:35
dc99bbd to
6e9a5d6
Compare
reidbaker-agent
force-pushed
the
agp-ndk-fallback
branch
from
July 28, 2026 13:35
7e60b17 to
106779a
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 28, 2026 13:37
6e9a5d6 to
8650166
Compare
reidbaker-agent
force-pushed
the
agp-ndk-fallback
branch
from
July 28, 2026 13:37
106779a to
f247915
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 29, 2026 20:17
8650166 to
46063e6
Compare
reidbaker-agent
force-pushed
the
agp-ndk-fallback
branch
from
July 29, 2026 20:18
f247915 to
308ba7e
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 29, 2026 20:42
46063e6 to
bece987
Compare
reidbaker-agent
force-pushed
the
agp-ndk-fallback
branch
from
July 29, 2026 20:43
308ba7e to
c459db2
Compare
reidbaker
force-pushed
the
agp-plugin-buildtypes
branch
from
July 31, 2026 18:07
bece987 to
ffbce64
Compare
reidbaker
force-pushed
the
agp-ndk-fallback
branch
from
July 31, 2026 18:07
c459db2 to
e257098
Compare
…public DSL Phase P4 of the AGP public-API migration (flutter#180137, flutter#166550): - AgpCommonExtensionWrapper gains externalNativeBuild, and both the already-configuring-a-native-build check in forceNdkDownload and the synthetic-cmake fallback now read/write cmake.path, cmake.buildStagingDirectory and the per-build-type externalNativeBuild.cmake.arguments through the public DSL (property assignment with File values instead of the legacy Any-taking CmakeOptions methods; arguments via the public MutableList). - getLegacyAndroidExtension and the BaseExtension import are deleted from FlutterPluginUtils; nothing in production sources references BaseExtension anymore. - forceNdkDownload tests move their mocks from BaseExtension/ internal CmakeOptions to the wrapper path (findByName("android") + public Cmake), assert cmake arguments by list content, and drop the defaultConfig-untouched assertions that only existed to guard the legacy extension. The two tests that asserted the old ApplicationExtension-vs-BaseExtension ndkVersion preference are deleted: getConfiguredNdkVersion has had a single source since P1. Also restores the findByType(ApplicationExtension) mocks (needed by isFlutterAppProject) that P1's test edit dropped in three tests. - FlutterPluginUtilsTest no longer imports internal.dsl.CmakeOptions or internal.dsl.DefaultConfig. Verification note: FGP unit tests could not be executed in this sandbox (network policy blocks dl.google.com); run 'gradle test' (both AGP axes) in packages/flutter_tools/gradle in CI, plus an NDK-absent scratch build exercising the synthetic-cmake fallback. Revert-safe until P5 lands.
reidbaker
force-pushed
the
agp-ndk-fallback
branch
from
August 6, 2026 14:37
e257098 to
e38162d
Compare
reidbaker
force-pushed
the
agp-plugin-buildtypes
branch
from
August 6, 2026 14:37
ffbce64 to
a68c691
Compare
This was referenced Aug 10, 2026
10 tasks
pull Bot
pushed a commit
to Little-Star888/flutter
that referenced
this pull request
Aug 12, 2026
…on documentation (flutter#190842) There are 2 files in this pr. One is a document the ai used to keep track of work. More importantly it acts kind of like issues so it references the items in future prs. The second is user facing website documentation. I do not know if we will use it verbatim but for the set of prs lets treat that md doc as human understandable documentation that we must understand before landing the next pr. Reviewers: When the pr is out of draft and your comments are fully addressed please prioritize this pr over other work. The review bar is higher, the number of reviews has more people and the work for the next pr is already done. - @reidbaker --- Standard review context for this pr stack This is PR is part of an 11 pr stack to migrate the "newdsl" `gradle-api` specifically in agp 9.1.0. The complete stack has pass pre submits, post submits and customer tests. https://flutter-dashboard.appspot.com/#/build?repo=flutter&branch=experimental/agp-gradle-api All of the code was LLM authored. A mix of manual prompting, automatic prompting, several models and adversarial review. The combined sessions are enough that I cannot include relevant prompts like I have been doing on other prs. If you want to review the pr stack you can find it here. These prs will be abandoned/closed as prs land into flutter/flutter. 1. reidbaker-agent#1 (branch: agp-api-doc) 2. reidbaker-agent#2 (branch: agp-internal-utils) 3. reidbaker-agent#3 (branch: agp-buildmode-deps) 4. reidbaker-agent#4 (branch: agp-plugin-buildtypes) 5. reidbaker-agent#5 (branch: agp-ndk-fallback) 6. reidbaker-agent#6 (branch: agp-assets-onvariants) 7. reidbaker-agent#7 (branch: agp-apk-copy-versioncode) 8. reidbaker-agent#8 (branch: agp-add-to-app) 9. reidbaker-agent#9 (branch: agp-aar-script) 10. reidbaker-agent#10 (branch: agp-newdsl-flip) 11. reidbaker-agent#11 (branch: agp-gradle-api) Follow up work is tracked in flutter#190964 This work is urgent in the sense that we are worried that android will publish agp 10 with no opt out but not so urgent that we are willing to break flutter users because we didn't review or understand the code because we were in a rush. Breaking changes are expected as part of this work. There are patterns the android team explicitly does not want apps to use and apis that have no equivalent. As part of the effort to ensure this work does not slip into ai slop, prs from this stack will be reviewed by me (@reidbaker) before asking for review. Then we will have 2 android expert reviewers also review the every pr. --- Agent authored pr description This is PR 1 of 11 in the AGP 9.1.0 / public `gradle-api` migration stack. It adds the contributor-facing and website draft documentation for the Flutter Gradle Plugin's migration to the Android Gradle Plugin public Variant API, which unblocks building Flutter Android apps with AGP's `newDsl=true` enabled. Part of flutter#180137 and flutter#166550. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: reidbaker-agent <reidbaker@google.com>
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 5 of 11 of the AGP public-API migration; stacked on #4.
Phase P4 of the AGP public-API migration (flutter#180137,
flutter#166550):
already-configuring-a-native-build check in forceNdkDownload and the
synthetic-cmake fallback now read/write cmake.path,
cmake.buildStagingDirectory and the per-build-type
externalNativeBuild.cmake.arguments through the public DSL (property
assignment with File values instead of the legacy Any-taking
CmakeOptions methods; arguments via the public MutableList).
from FlutterPluginUtils; nothing in production sources references
BaseExtension anymore.
internal CmakeOptions to the wrapper path (findByName("android") +
public Cmake), assert cmake arguments by list content, and drop the
defaultConfig-untouched assertions that only existed to guard the
legacy extension. The two tests that asserted the old
ApplicationExtension-vs-BaseExtension ndkVersion preference are
deleted: getConfiguredNdkVersion has had a single source since P1.
Also restores the findByType(ApplicationExtension) mocks (needed by
isFlutterAppProject) that P1's test edit dropped in three tests.
internal.dsl.DefaultConfig.
Verification note: FGP unit tests could not be executed in this sandbox
(network policy blocks dl.google.com); run 'gradle test' (both AGP
axes) in packages/flutter_tools/gradle in CI, plus an NDK-absent
scratch build exercising the synthetic-cmake fallback.
Revert-safe until P5 lands.
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).