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

Declare proguard rules automatically #1945

Closed
juliocbcotta opened this issue Aug 31, 2021 · 3 comments · Fixed by #2397
Closed

Declare proguard rules automatically #1945

juliocbcotta opened this issue Aug 31, 2021 · 3 comments · Fixed by #2397

Comments

@juliocbcotta
Copy link

juliocbcotta commented Aug 31, 2021

Could gson have basic proguard rules automatically declared as retrofit does ?
https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro

@eamonnmcmanus
Copy link
Member

I think that's exactly what #1929 proposes, but for that PR to proceed someone should write a test for it.

@basurahan
Copy link

Any update to this one

@Marcono1234
Copy link
Collaborator

Marcono1234 commented May 28, 2023

Default rules have been added by #2397 and will be available in the next version. However, would be great if you could try building Gson locally already and see if the snapshot version of Gson correctly applies the rules.

Any feedback regarding these rules, such as if something is missing or is too coarse, is highly appreciated!

Also keep in mind that these default library rules cannot cover everything; if you have specific classes or fields which should be preserved and you are not using @SerializedName you might have to add additional rules for your build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants