-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pick up consumer proguard rules correctly #62
Conversation
@@ -17,15 +17,9 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | |||
android.useAndroidX=true | |||
# Kotlin code style for this project: "official" or "obsolete": | |||
kotlin.code.style=official | |||
# Enables namespacing of each library's R class so that its R class includes only the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are default values from >= AGP 8, so removing them
@@ -32,7 +31,7 @@ android { | |||
|
|||
buildTypes { | |||
release { | |||
consumerProguardFiles("proguard-rules.pro") | |||
consumerProguardFiles("consumer-rules.pro") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file name didn't match, probably a typo since its correct in L24.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing looks wrong so assuming you know what you're doing 😅
Hopefully :D |
💡 Motivation and Context
If Proguard/R8 removed the classes/methods/ctor not referenced directly.
https://github.com/google/gson/blob/2658aca66a1d0f097794a5ad5eb33c095a8f8d5d/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java#L273C39-L273C67
💚 How did you test it?
Running the sample with R8 enabled.
📝 Checklist