The three successive build failures and their fixes: AAR metadata demands AGP 9.1+, the kotlin-android plugin crashes on a BaseExtension cast and must be removed in favour of AGP 9 built-in Kotlin, then compileSdk must reach 37.
Android

Compose 1.12 forces AGP 9, and AGP 9 breaks kotlin-android — remove the plugin, don’t upgrade it

Three build walls in a row: AAR metadata demands AGP 9.1+, kotlin-android dies on a BaseExtension cast even at its latest version, and compileSdk must reach 37.