Deep Dive into the Android Gradle Plugin
summary
Explains what the Android Gradle Plugin actually does: task graph versus configuration, why variant-aware tasks are created in afterEvaluate, and how the build shells out to an AAPT2 daemon (parallel workers that convert resources to a binary flat file). Shows the r.jar feature to skip generating r.java and avoid javac for pure Kotlin modules, the artifact view API for wiring artifacts, and claims enabling build cache gives about 60% improvement in local builds.
AI-written summary · about
chapters (15)
- 0:00Introduction and setup
- 1:53Gradle build phases explained
- 8:54Task configuration pitfalls
- 13:29Execution phase and task graph
- 15:36Variants and build types
- 17:00Debugging Gradle builds
- 23:56API vs implementation dependencies
- 28:29AAR build task breakdown
- 33:47Resource processing internals
- 43:41Manifest merging details
- 45:49R.java and build optimizations
- 48:19Lint and artifact views
- 51:48Transform API and bytecode
- 52:50Feature flags and build improvements
- 54:16Profiling and build optimization
related talks
39mAndroid Gradle Plugin internals
34mWhat's new with the Android Gradle plugin
42mWriting your own Gradle Plugin: A Deep Dive
44mBuild your android app without the Android Gradle Plugin
11mWhat’s new in Android Gradle plugin
39mKotlinify your Gradle
21mWhat's new in Android Build
21mMake Gradle work for you, create your own tasks and plugins
