Skip to content

Conversation

@christofferqa
Copy link
Contributor

R8 version 3.0 started to remove generic signatures from items that are not matched by a -keep rule in full mode (see also https://r8.googlesource.com/r8/+/744d742137a82656b8ee27513f975e0528aecd78). The motivation for this change is to avoid that all generic signatures are retained in programs, when only a few are typically required for reflection.

This change adds a rule that causes the generic signatures of com.google.gson.reflect.TypeToken and its subclasses to be retained. This is needed because com.google.gson.reflect.TypeToken reflectively accesses its own generic signature.

References:

@google-cla google-cla bot added the cla: yes label Aug 5, 2021
@eamonnmcmanus
Copy link
Member

Thanks!

@eamonnmcmanus eamonnmcmanus merged commit 789818d into google:master Aug 5, 2021
@ganadist
Copy link
Contributor

@eamonnmcmanus
Can you look #1929 to apply proguard/r8 rules automatically?

@Marcono1234 Marcono1234 added the proguard-r8 Issues relating to the use of ProGuard and/or R8, such as problems due to obfuscation label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes proguard-r8 Issues relating to the use of ProGuard and/or R8, such as problems due to obfuscation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants