From afb6e040317f0b0fe433d77a069229d44d490366 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:18:22 -0500 Subject: [PATCH] diag(r8): disable minify+resource-shrinking for release builds (DO NOT MERGE) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Diagnostic build to isolate the Compose animation-freeze observed since CMP 1.11.0-beta02. -dontoptimize is verified active in the merged R8 config but animations still freeze, so we need to determine whether R8 itself (shrinking, consumer-rule -assumenosideeffects directives, resource shrinking) is responsible — or whether the bug lives entirely in compose-multiplatform 1.11.0-beta02. Test plan: - Ship as v2.7.14-internal.60. - Test animations on device (e.g. node-list pulse, refresh spinner, message bubble entry). - If animations work -> R8 is the cause; follow up with narrower diag (weaken Compose -keep rules, then re-enable shrinkResources separately). - If animations frozen -> R8 is innocent; CMP 1.11.0-beta02 runtime bug. File upstream + plan downgrade / version pin. REVERT after diagnosis. Release builds MUST ship with R8 enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AndroidApplicationConventionPlugin.kt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt index 38cc021a7..81729f5a0 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -41,8 +41,22 @@ class AndroidApplicationConventionPlugin : Plugin { buildTypes { getByName("release") { - isMinifyEnabled = true - isShrinkResources = true + // DIAGNOSTIC BUILD (internal.60): R8 is fully disabled to prove + // whether the Compose animation freeze observed since CMP 1.11.0-beta02 + // is caused by R8 (shrinking / consumer-rule -assumenosideeffects / + // resource shrinking) or by a CMP runtime bug independent of R8. + // + // - If animations work in this build → R8 is the cause; follow up with + // a narrower diag (weaken Compose -keep rules to allow class-merging, + // or toggle isShrinkResources only). + // - If animations remain frozen → R8 is innocent; the bug is in + // compose-multiplatform 1.11.0-beta02 itself. File upstream and + // downgrade / pin. + // + // REVERT once the diagnostic is concluded — release builds MUST ship + // with R8 enabled. + isMinifyEnabled = false + isShrinkResources = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), rootProject.file("config/proguard/shared-rules.pro"),