Status Update
Comments
je...@google.com <je...@google.com>
an...@google.com <an...@google.com> #2
Thanks for the detailed bug report and for taking the time to identify the change causing this.
From a first look this seems to be working as intended. In R8 3.0, the behavior of R8 in presence of -dontoptimize
was changed to be more aggressive (
Could you try building with R8 3.0.46, which should not have the more aggressive behavior, to validate that it is indeed the above two CLs that significantly reduce the dex size?
In order to fix this, you would need to remove -dontoptimize
from your Proguard configuration. To start with, you could maybe replace -dontoptimize
by the following rule, which should effectively mark the matched items as not subject to optimization, due to the absence of ,allowoptimization
.
-keep,allowaccessmodification,allowobfuscation,allowshrinking class * { <fields>; <methods>; }
You could then try to narrow down the set of items matched by this rule to reduce the dex size of your app.
Description
Jetpack Compose release version: 1.2.0-alpha01 / 1.1.0-rc01 Android Studio Build: Android Studio Arctic Fox | 2020.3.1 Patch 3 Build #AI-203.7717.56.2031.7784292, built on October 1, 2021 Runtime version: 11.0.10+0-b96-7249189 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.0.1 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 10 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: com.intellij.plugins.vscodekeymap
Kotlin version: 1.6.10
See sample repohttps://github.com/nathan-castlehow/animatedscroll
The animateToItem scroll call occasionally fails in the presence of the request focus in the same function. Commenting it out / adding a delay in between causes the scroll to work. Not sure if it is related to the request focus or whether it just has to do with extra work being done. I get this issue more often in more complicated scenarios but this minimal recreation I think would be the same issue.
Test 1:
Test 2: