frankiesardo / auto-parcel

Android Parcelable models made easy
Eclipse Public License 1.0
1.37k stars 83 forks source link

Proguard warnings about using guava classes #19

Closed dimsuz closed 9 years ago

dimsuz commented 9 years ago

Since I upgraded to auto-parcel-0.3 my release build fails with these warnings from proguard:

Warning: library class auto.parcel.processor.SimpleNameFunction extends 
  or implements program class com.google.common.base.Function
Warning: library class auto.parcel.processor.TypeSimplifier$1$1 extends 
  or implements program class com.google.common.base.Predicate
Warning: library class com.google.auto.common.MoreTypes$1 extends 
  or implements program class com.google.common.base.Equivalence
Warning: there were 3 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.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)

These are probably related lines from my build.gradle:

    compile 'com.google.guava:guava:18.0'
    compile 'com.github.frankiesardo:auto-parcel:0.3'
    provided 'com.github.frankiesardo:auto-parcel-processor:0.3'

I am not sure whether this is an issue in auto-parcel, but since I did not have it with 0.2 version I decided to report.

JakeWharton commented 9 years ago

Use the android-apt Gradle plugin and its 'apt' configuration instead of 'provided' for the compiler. On Mar 15, 2015 5:00 AM, "dimsuz" notifications@github.com wrote:

Since I upgraded to auto-parcel-0.3 my release build fails with these warnings from proguard:

Warning: library class auto.parcel.processor.SimpleNameFunction extends or implements program class com.google.common.base.Function Warning: library class auto.parcel.processor.TypeSimplifier$1$1 extends or implements program class com.google.common.base.Predicate Warning: library class com.google.auto.common.MoreTypes$1 extends or implements program class com.google.common.base.Equivalence Warning: there were 3 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. (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)

These are probably related lines from my build.gradle:

compile 'com.google.guava:guava:18.0'
compile 'com.github.frankiesardo:auto-parcel:0.3'
provided 'com.github.frankiesardo:auto-parcel-processor:0.3'

I am not sure whether this is an issue in auto-parcel, but since I did not have it with 0.2 version I decided to report.

— Reply to this email directly or view it on GitHub https://github.com/frankiesardo/auto-parcel/issues/19.

JakeWharton commented 9 years ago

Or just ignore the warning. It won't actually be a problem. On Mar 15, 2015 11:00 AM, "Jake Wharton" jakewharton@gmail.com wrote:

Use the android-apt Gradle plugin and its 'apt' configuration instead of 'provided' for the compiler. On Mar 15, 2015 5:00 AM, "dimsuz" notifications@github.com wrote:

Since I upgraded to auto-parcel-0.3 my release build fails with these warnings from proguard:

Warning: library class auto.parcel.processor.SimpleNameFunction extends or implements program class com.google.common.base.Function Warning: library class auto.parcel.processor.TypeSimplifier$1$1 extends or implements program class com.google.common.base.Predicate Warning: library class com.google.auto.common.MoreTypes$1 extends or implements program class com.google.common.base.Equivalence Warning: there were 3 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. (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)

These are probably related lines from my build.gradle:

compile 'com.google.guava:guava:18.0'
compile 'com.github.frankiesardo:auto-parcel:0.3'
provided 'com.github.frankiesardo:auto-parcel-processor:0.3'

I am not sure whether this is an issue in auto-parcel, but since I did not have it with 0.2 version I decided to report.

— Reply to this email directly or view it on GitHub https://github.com/frankiesardo/auto-parcel/issues/19.

dimsuz commented 9 years ago

In this case I will ignore, because I recall that I once tried using android-apt and it got into some mess due to issues with other dependencies. Thanks. Please close the issue if it is irrelevant.

frankiesardo commented 9 years ago

afaik there are issues if you mix and match provided and apt scope in your build file. If you stick with apt everything should be fine.