06 October 2022
Posted by Wojtek Kaliciński, Boris Farber, Android Developer Relations Engineers, and Xavier Ducrohet, Android Studio Tech Lead
To improve build speed and provide stable APIs, the Transform APIs will be removed in Android Gradle plugin (AGP) version 8.0. Most use cases have replacement APIs which are available starting from AGP version 7.2. Read on for more details.
The Android developer community's top request has been to improve build speed while making sure Android Gradle plugin (AGP) has a solid, stable, and well supported API.
To improve build speed starting from AGP 7.2, we have stabilized the Artifacts API and updated the Instrumentation API. For common use cases, these APIs replace the Transform APIs, which cause longer build times and are gone in AGP 8.0.
This article walks you through transitioning off the Transform APIs, whether you're working on a Gradle plugin or an application.
To improve build times, we split Transform's functionality into the following APIs that are optimized for common use cases:
For examples of how to use the replacement APIs see the Transform API update note, and our Gradle recipes.
Make sure that you update your plugins to be AGP 8.0 compliant before updating your app to AGP 8.0. If the relevant plugins are not compliant, please create a bug that includes a link to this post and send it to the plugin authors.
Several commonly used plugins have already migrated to use these new APIs, including the Hilt Gradle plugin.
If your use case is not covered by any of the new APIs, please file a bug.
We encourage you to get started with making your plugins compatible with the new AGP APIs. Getting started now means that you have enough time to familiarize yourself with the APIs, share your feedback and then upgrade your dependencies and plugins.