Skip to content
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

Gradle 8 updates #2669

Merged
merged 9 commits into from
Apr 17, 2024
Merged
3 changes: 3 additions & 0 deletions app/proguard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
-dontwarn sun.misc.Unsafe

-dontwarn org.xmlpull.v1.**
-dontwarn org.kxml2.io.**
-dontwarn android.content.res.**
-dontwarn javax.annotation.**,javax.microedition.**
-dontwarn org.apache.**
-dontwarn org.joda.**
Expand Down Expand Up @@ -102,6 +104,7 @@
-dontnote okhttp3.**

#Retrofit Stuff
-keep class retrofit2.** { *; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does Gradle update affect proguard rules ?

Copy link
Contributor

@avazirna avazirna Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gradle 8 is on full mode by default, which means more aggressive optimizations. In this case, it was causing IllegalArgumentExceptions with the message Call return type must be parameterized as Call<Foo> or Call<? extends Foo> during get requests, which made me suspect that maybe some references had been obfuscated. After some digging, I found some posts that pointed that way too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, although I don't think it's a good practice to retain all code from a package. Probably we should instead take the rules from here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this is still pending.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, just pushed that also

-dontnote retrofit2.Platform
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
Expand Down