Fixed
Status Update
Comments
do...@traveloka.com <do...@traveloka.com> #2
Building note: run ./gradlew ... -x processReleaseMetadata
pa...@gmail.com <pa...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 5f6e46e40a7e47924ac1d04426230466de7b6f38
Author: Sergey Vasilinets <sergeyv@google.com>
Date: Tue Aug 07 15:57:10 2018
Fix ViewModel proguard rules
It removes allowshrinking modifier: a constructor
shouldn't be removed if it is unused, because it is
called through reflection
Test: manual =\
bug: 112230489
Change-Id: I215fe895fa12eb04172e9380a296e2d74567907c
M lifecycle/viewmodel/proguard-rules.pro
https://android-review.googlesource.com/727573
https://goto.google.com/android-sha1/5f6e46e40a7e47924ac1d04426230466de7b6f38
Branch: androidx-master-dev
commit 5f6e46e40a7e47924ac1d04426230466de7b6f38
Author: Sergey Vasilinets <sergeyv@google.com>
Date: Tue Aug 07 15:57:10 2018
Fix ViewModel proguard rules
It removes allowshrinking modifier: a constructor
shouldn't be removed if it is unused, because it is
called through reflection
Test: manual =\
bug: 112230489
Change-Id: I215fe895fa12eb04172e9380a296e2d74567907c
M lifecycle/viewmodel/proguard-rules.pro
pa...@gmail.com <pa...@gmail.com> #4
Thanks!
ga...@google.com <ga...@google.com> #5
I had the similar problem. Hoping the problem will be fixed in the next release. Thank team!
ap...@google.com <ap...@google.com> #7
When will rc02 be released?
Description
Java version "1.8.0_121"
Jetifier version: 1.0.0-beta04
Let there be a Library Foo with the following 'proguard-rules.txt' file:
# DBFlow
-keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }
-dontwarn com.raizlabs.android.dbflow.**
# Note: the configuration keeps the entry point 'com.raizlabs.android.dbflow.config.FlowManager$GlobalDatabaseHolder { FlowManager$GlobalDatabaseHolder(com.raizlabs.android.dbflow.config.FlowManager$1); }', but not the descriptor class 'com.raizlabs.android.dbflow.config.FlowManager$1'
-keep class com.raizlabs.android.dbflow.config.FlowManager$*
When trying to jetify this library:
./jetifier-standalone -i /Users/someuser/Downloads/foo/foo.aar -o newfoo.aar
The Jetifier fails with the following output:
Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal repetition near index 147
com/raizlabs/android/dbflow/.*
# Note: the configuration keeps the entry point 'com/raizlabs/android/dbflow/config/FlowManager$GlobalDatabaseHolder { FlowManager$GlobalDatabaseHolder(com/raizlabs/android/dbflow/config/FlowManager$1); }'
^
at java.util.regex.Pattern.error(Pattern.java:1955)
at java.util.regex.Pattern.closure(Pattern.java:3157)
at java.util.regex.Pattern.sequence(Pattern.java:2134)
at java.util.regex.Pattern.expr(Pattern.java:1996)
at java.util.regex.Pattern.compile(Pattern.java:1696)
at java.util.regex.Pattern.<init>(Pattern.java:1351)
at java.util.regex.Pattern.compile(Pattern.java:1028)
at com.android.tools.build.jetifier.core.type.TypesMap.matchOldProguardForNewTypes(TypesMap.kt:112)
[...]
If i remove the notes, the new 'proguard-rules.txt' looks like this:
# DBFlow
-keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }
-dontwarn com.raizlabs.android.dbflow.**
-keep class com.raizlabs.android.dbflow.config.FlowManager$*
And this runs through the jetifier just fine. Please provide a fix for this issue, since i have to patch my dependencies currently in order to make AndroidX work for me.