Generate a baseline profile for release builds

Cold starts ran unoptimised: no profileinstaller dependency and no
profile in the bundle, so ART interpreted Compose on first launch
(class verification measured at 128 bytecodes/s in an emulator ANR).

Add the androidx.baselineprofile producer module with an AOSP managed
device, a generator covering startup plus the four detail tabs, and
commit the generated baseline and startup profiles.
This commit is contained in:
2026-08-12 13:58:01 +02:00
parent 4c0524618d
commit 8541130fa3
568 changed files with 181192 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ serialization = "1.7.3"
retrofitSerialization = "1.0.0"
coil = "2.7.0"
playReview = "2.0.2"
benchmark = "1.4.1"
profileinstaller = "1.4.1"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -41,10 +43,16 @@ okhttp-logging = { group = "com.squareup.okhttp3", name = "logging-interceptor",
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }
play-review-ktx = { group = "com.google.android.play", name = "review-ktx", version.ref = "playReview" }
androidx-profileinstaller = { group = "androidx.profileinstaller", name = "profileinstaller", version.ref = "profileinstaller" }
androidx-benchmark-macro-junit4 = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "benchmark" }
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version = "1.2.1" }
androidx-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version = "2.3.0" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
android-test = { id = "com.android.test", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
baselineprofile = { id = "androidx.baselineprofile", version.ref = "benchmark" }