Zygote
How apps work

The build system

What ./gradlew assembleRelease actually does.

5 pages60 min5 interactive8200 words
  1. 01Build tooling historyEclipse and Ant, then Android Studio and Gradle, then Kotlin DSL and version catalogs. Every switch replaced the thing that had become the bottleneck, and each one kept the old output format alive.intermediate12 mininteractive
  2. 02The build pipelineWhat ./gradlew assembleRelease actually does: eleven stages from resource merge to signature, which of them are cacheable, and which one is responsible when a release build behaves differently from a debug build.intermediate13 mininteractive
  3. 03R8 and shrinkingR8 is three tools in one overcoat: a shrinker, an optimiser and an obfuscator that also dexes. Almost every release-only crash is a keep rule that was missing, and almost every keep rule that is too broad costs you the shrinking you wanted.nerd12 mininteractive
  4. 04A mental model for GradleGradle is a task graph with three phases and a cache. Once you can name the phase a problem happens in — configuration or execution — most build mysteries stop being mysteries.intermediate12 mininteractive
  5. 05How AOSP buildsThe platform build is a different universe from your app build: Make gave way to Soong, Soong feeds Ninja, and Android.bp replaced Android.mk. It is the largest source tree most people will ever compile.nerd11 mininteractive

Test yourself

Test yourself: The build system

1 / 8

Why does AAPT2 link run before Kotlin compilation?

0 answered · 0 correct