Assigned
Status Update
Comments
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #2
Information redacted by Android Beta Feedback.
ch...@google.com <ch...@google.com> #3
also the navbar on this page is not transparent
ch...@google.com <ch...@google.com> #4
We have passed this to the development team and will update this issue with more information as it becomes available.
Description
Android Gradle Plugin 8.8.2 Hilt/Dagger 2.55
It looks like R8 is optimizing the code of the library (external dependency) in the way which breaks Hilt compatibility. After investigation I found out that when library ViewModel class is obfuscated in the final app build then the key by which it's registered into hilt viewmodel map is not changed (still contains nonobfuscated class name). Having these options in library proguard rules:
does not help. However wverything works when library build has
isMinifyEnabled
is set to falseI'm attaching sample project which reproduces this issue.
gradlew :library:assembleRelease
to build library aarapp
module (not as aproject()
dependency but asaar
)isMinifyEnabled
is set to true)