Android Gradle Plugin DSL/API migration timeline

The Android Gradle Plugin (AGP) is the supported build system for Android applications and includes support for compiling many different types of sources and linking them together into an application that you can run on a physical Android device or an emulator.

The following section describes the planned evolution of the AGP’s DSL and API. As new APIs are introduced in stable releases, old APIs will be marked as deprecated. Those deprecated APIs will then become unavailable in the next stable release. Below you will find information about upcoming changes in each major AGP release.

For a more detailed log of AGP API deprecations or removals, see the AGP API updates.

AGP 9.0 (Mid-2024)

New Variant APIs are stable, old APIs are deprecated

  • The Variant APIs that were incubating in 4.1 and 4.2 are stable.
  • All of these interfaces are located in the gradle-api artifact.
  • The previous interfaces and classes used in the old Variant API are now deprecated.

New DSL interfaces are stable, old ones are deprecated

  • The DSL interfaces that were incubating in 4.1, 4.2 and 7.0 are now stable.
  • All of these interfaces are located in the gradle-api artifact.
  • The previous interfaces and classes used in the DSL are now deprecated.

Private internal AGP classes still accessible

Private internal classes from AGP, located in other artifacts, are still accessible during compilation of build files, but it is not recommended to use them as they may change in breaking ways at any time.

AGP 10.0 (2025)

Old APIs are removed

  • All previous interfaces and classes used in the DSL and the old Variant API are deleted.
  • The gradle-api artifact is the only artifact you need to access DSL and variant API interfaces and classes, and should be used when developing plugins.
  • Using Gradle metadata, which offers different dependency graphs for compile and runtime, only gradle-api artifact is available during compilation of build files.

(Tentative) Access to private internal AGP classes is removed

Dependency on the gradle artifact now hides all internal classes and gives compilation access only to the interfaces and classes available in the gradle-api artifact. This impacts both plugin and build file compilation.

It isn't possible to manually add a dependency to get access to the internal classes.