Skip to content

[AGP 9] Migrate detectLowCompileSdkVersionOrNdkVersion from project.afterEvaluate #184415

Description

@jmagman

Background

AGP 9 transitions exclusively to the new DSL interfaces and hides the legacy variant API. Currently, the Flutter Gradle Plugin uses project.afterEvaluate to run the detectLowCompileSdkVersionOrNdkVersion check. We need to investigate whether this approach violates the new DSL rules or conflicts with modern Gradle configuration avoidance patterns.

Note: This specific migration may or may not be strictly required to support AGP 9, but it needs investigation to confirm compatibility and ensure it does not cause issues when opting into the new DSL.

Work

  • Investigate the current use of project.afterEvaluate for the detectLowCompileSdkVersionOrNdkVersion check.
  • Determine if the implementation conflicts with the new AGP DSL or Gradle's recommended task configuration avoidance APIs.
  • If changes are required, migrate the logic to a supported configuration step or defined AGP entry point.
  • Add tests to validate the updated logic if any modifications are made.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions