Transform APIs can be used to increase build speed and offer stable APIs.
Removed from Android Gradle plugin (AGP) version 8.0. Most uses have
Replacement APIs are now available beginning with AGP version 7.2. Continue reading
for more details.
It Android Developer community has made speed improvements their top priority.
While making certain Android Gradle plugin AGP has a strong, stable, well-designed and intuitive interface.
Stabilization has been implemented to increase build speed, starting at AGP 7.
The latest version
API for Instrumentation. These APIs are for common uses cases.
AGP 8.0 has removed Transform APIs which can cause slower build times.
This article will guide you through how to transition off Transform APIs.
You’re currently working on an application or a Gradle plugin.
Guidance to Gradle plugins
Transform was split into these functionalities to improve the build time.
Optimized APIs for Common Use Cases
API makes it easy to analyze and transform compiled classes of app code using
ASM callbacks Take, for example.
This API allows you to create custom trace to classes or methods for more ore.
API allows you to access files and directories that are temporary or permanent.
AGP generates these during build. You can use this API to:
You can add additional classes that are generated to your app. Like glue
code for dependency injection.
When possible, implement transformations that are based on a complete program analysis.
It is possible to combine classes into one task. This can only be done in a single task.
Available starting at AGP 7.4.0–alpha06. Available starting at AGP 7.4.0-alpha06. build.gradle.kts File
in the “modifyProjectClasses” Gradle recipe shows how to do it.
Examples of how to See the alternative APIs for more information.
Note: Transform API Update Note, and our
Learn how to make a gradle.
Prior to updating your plugins, ensure that they are AGP 8.2 compliant
Allow AGP 8.2 to be added to your application. If you are unable to compile the plugins, please create
You can send the bug along with a link to the post as an attachment to the plugin authors.
It has been reported that many plugins used regularly have already switched to the new APIs.
Hilt Gradle plugin.
Please share your comments
You can contact us if you have a use case that isn’t included in the new APIs.
Report a bug
Start making plugins compatible to the
AGP APIs are now available. Start now to make sure you’re on the right track.
Learn the APIs. Share your thoughts and upgrade.
Dependencies and plugins