Closed xdgimf closed 5 years ago
Do you have a Gson dependency?
On Sun, Dec 31, 2017, 9:51 AM Miguel Fermin notifications@github.com wrote:
Updated to 0.7.0 and got this proguard warnings when i build a signed apk.
Warning: library class com.ryanharter.auto.value.gson.GenerateTypeAdapter$1 extends or implements program class com.google.gson.TypeAdapterFactory
Warning: there were 1 instances of library classes depending on program classes. You must avoid such dependencies, since the program classes will be processed, while the library classes will remain unchanged.
Here's my depedencies
depedencies { //... compileOnly "com.jakewharton.auto.value:auto-value-annotations:$project.ext.autoValueAnnotationsVersion" compileOnly "com.ryanharter.auto.value:auto-value-gson:$project.ext.autoValueGsonVersion" annotationProcessor "com.google.auto.value:auto-value:$project.ext.autoValueVersion" annotationProcessor "com.ryanharter.auto.value:auto-value-gson:$project.ext.autoValueGsonVersion" annotationProcessor "com.ryanharter.auto.value:auto-value-parcel:$project.ext.autoValueParcelVersion" //... }
For now I ignored the warnings by adding the following rules:
-dontwarn com.ryanharter.auto.value.gson.GenerateTypeAdapter -dontwarn com.google.gson.TypeAdapterFactory
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rharter/auto-value-gson/issues/162, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEQDEtXXlyHeOAoKSj7B4cAMf5yK2ks5tF59dgaJpZM4RP3aW .
Yes, I have a Gson dependency.
any updates on this?
Only thing I can think of is that proguard is complaining that there's code in the annotations artifact that isn't there at runtime because you're not compiling the annotations. There's a full TypeAdapterFactory implementation in the GenerateTypeAdapter annotation code
Closing this out, but the rules above should suffice. Unfortunately we can't solve this with an embedded proguard file as these would be compileOnly and presumably not reach proguard/R8 tools to index on
Updated to 0.7.0 and got this proguard warnings related to the new annotation
@GenerateTypeAdapter
. I haven't used it yet so I'm not really sure.Here's the proguard warning
Here's my dependencies
For now I simply ignored the warnings by adding the following rules:
Edit: Added Gson dependency