We are migrating from Android Gradle plugin 2.3.3 to Gradle plugin 3.0.1. Our application consists of an Application module and a Library module. Several dependencies are transitive (connected using api
keyword) but even making them non-transitive using implementation
doesn't help. After changing all the compile
-type dependencies to the new ones, debug build works well. However, release build with Proguard shows thousands of warnings (on 2.3.3 everything goes well)
In particular, I don't get why do we have such problems, when Android classes from library depend on Android classes from program (here are just few examples):
Warning: library class android.app.ActionBar$LayoutParams extends or implements program class android.view.ViewGroup$MarginLayoutParams
Warning: library class android.app.ActivityManager$TaskDescription extends or implements program class android.os.Parcelable
Warning: library class android.widget.Toolbar depends on program class android.view.ViewGroup$LayoutParams
Overall, there are next types of warnings that do not appear on Gradle plugin 2.3.3 (so, Proguard is already configured):
Warning: there were 72 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 1373 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)
Warning: there were 1056 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
FAILURE: Build failed with an exception.
Here is the list of dependencies (gradle -q app:dependencies --configuration developmentDebugRuntimeClasspath
):
Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Configuration 'debugCompile' in project ':vyng-core' is deprecated. Use 'debugImplementation' instead.
Configuration 'compile' in project ':vyng-core' is deprecated. Use 'implementation' instead.
------------------------------------------------------------
Project :app
------------------------------------------------------------
developmentDebugRuntimeClasspath - Resolved configuration for runtime for variant: developmentDebug
+--- io.objectbox:objectbox-android-objectbrowser:1.3.4
| \--- io.objectbox:objectbox-java:1.3.4
| +--- io.objectbox:objectbox-java-api:1.3.4
| +--- org.greenrobot:essentials:3.0.0-RC1
| +--- com.google.flatbuffers:flatbuffers-java:1.7.2
| \--- com.google.code.findbugs:jsr305:3.0.2
+--- com.squareup.leakcanary:leakcanary-android:1.5.4
| \--- com.squareup.leakcanary:leakcanary-analyzer:1.5.4
| +--- com.squareup.leakcanary:leakcanary-watcher:1.5.4
| \--- com.squareup.haha:haha:2.0.3
+--- project :vyng-core
| +--- com.afollestad.material-dialogs:core:0.9.6.0
| | +--- com.android.support:support-annotations:27.0.1 -> 27.0.2
| | +--- com.android.support:appcompat-v7:27.0.1 -> 27.0.2
| | | +--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-core-utils:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- android.arch.lifecycle:runtime:1.0.3
| | | | +--- android.arch.lifecycle:common:1.0.3
| | | | \--- android.arch.core:common:1.0.0
| | | +--- com.android.support:support-fragment:27.0.2
| | | | +--- com.android.support:support-compat:27.0.2 (*)
| | | | +--- com.android.support:support-core-ui:27.0.2
| | | | | +--- com.android.support:support-annotations:27.0.2
| | | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | | +--- com.android.support:support-core-utils:27.0.2 (*)
| | | | \--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-vector-drawable:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:animated-vector-drawable:27.0.2
| | | +--- com.android.support:support-vector-drawable:27.0.2 (*)
| | | \--- com.android.support:support-core-ui:27.0.2 (*)
| | +--- com.android.support:recyclerview-v7:27.0.1 -> 27.0.2
| | | +--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:support-core-ui:27.0.2 (*)
| | \--- me.zhanghai.android.materialprogressbar:library:1.4.2
| | +--- com.android.support:appcompat-v7:26.0.2 -> 27.0.2 (*)
| | \--- com.android.support:support-annotations:26.0.2 -> 27.0.2
| +--- com.jakewharton:butterknife:8.8.1
| | +--- com.jakewharton:butterknife-annotations:8.8.1
| | | \--- com.android.support:support-annotations:25.3.0 -> 27.0.2
| | +--- com.android.support:support-annotations:25.3.0 -> 27.0.2
| | \--- com.android.support:support-compat:25.3.0 -> 27.0.2 (*)
| +--- com.android.support:support-annotations:27.0.2
| +--- com.android.support:customtabs:27.0.2
| | +--- com.android.support:support-compat:27.0.2 (*)
| | \--- com.android.support:support-annotations:27.0.2
| +--- com.jakewharton.hugo:hugo-annotations:1.2.1
| +--- com.jakewharton.hugo:hugo-runtime:1.2.1
| | +--- com.jakewharton.hugo:hugo-annotations:1.2.1
| | \--- org.aspectj:aspectjrt:1.8.5
| +--- org.aspectj:aspectjrt:1.8.5
| +--- com.airbnb.android:lottie:2.2.5
| | \--- com.android.support:appcompat-v7:26.1.0 -> 27.0.2 (*)
| +--- com.muddzdev:styleabletoast:1.0.9
| | \--- com.android.support:appcompat-v7:25.3.1 -> 27.0.2 (*)
| +--- com.facebook.rebound:rebound:0.3.8
| +--- jp.wasabeef:glide-transformations:3.0.1
| | \--- com.github.bumptech.glide:glide:4.0.0
| | +--- com.github.bumptech.glide:gifdecoder:4.0.0
| | | \--- com.android.support:support-annotations:25.3.1 -> 27.0.2
| | +--- com.github.bumptech.glide:disklrucache:4.0.0
| | \--- com.github.bumptech.glide:annotations:4.0.0
| +--- com.googlecode.libphonenumber:libphonenumber:8.8.1
| +--- com.bluelinelabs:conductor:2.1.3 -> 2.1.4
| | \--- com.android.support:support-annotations:25.3.1 -> 27.0.2
| +--- io.reactivex.rxjava2:rxjava:2.1.6
| | \--- org.reactivestreams:reactive-streams:1.0.1
| +--- io.reactivex.rxjava2:rxandroid:2.0.1
| | \--- io.reactivex.rxjava2:rxjava:2.0.1 -> 2.1.6 (*)
| +--- com.tbruyelle.rxpermissions2:rxpermissions:0.9.4
| +--- com.crashlytics.sdk.android:crashlytics:2.6.8
| | +--- com.crashlytics.sdk.android:beta:1.2.5
| | | \--- io.fabric.sdk.android:fabric:1.3.17
| | +--- io.fabric.sdk.android:fabric:1.3.17
| | +--- com.crashlytics.sdk.android:crashlytics-core:2.3.17
| | | +--- io.fabric.sdk.android:fabric:1.3.17
| | | \--- com.crashlytics.sdk.android:answers:1.3.13
| | | \--- io.fabric.sdk.android:fabric:1.3.17
| | \--- com.crashlytics.sdk.android:answers:1.3.13 (*)
| +--- com.jakewharton.timber:timber:4.6.0
| +--- org.slf4j:slf4j-api:1.7.25
| +--- com.github.tony19:logback-android-core:1.1.1-6
| +--- com.github.tony19:logback-android-classic:1.1.1-6
| | +--- com.github.tony19:logback-android-core:1.1.1-6
| | \--- com.github.tony19:apktool-lib:1.4.4-3
| | \--- com.google.android:android:2.1_r1
| | +--- commons-logging:commons-logging:1.1.1
| | +--- org.apache.httpcomponents:httpclient:4.0.1
| | | +--- org.apache.httpcomponents:httpcore:4.0.1
| | | +--- commons-logging:commons-logging:1.1.1
| | | \--- commons-codec:commons-codec:1.3
| | +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
| | +--- xerces:xmlParserAPIs:2.6.2
| | \--- xpp3:xpp3:1.1.4c
| +--- com.google.dagger:dagger:2.11
| | \--- javax.inject:javax.inject:1
| +--- com.google.android.exoplayer:exoplayer-core:r2.4.4 -> r2.5.1
| | \--- com.android.support:support-annotations:25.4.0 -> 27.0.2
| +--- com.google.android.exoplayer:exoplayer-dash:r2.4.4 -> r2.5.1
| | +--- com.google.android.exoplayer:exoplayer-core:r2.5.1 (*)
| | +--- com.android.support:support-annotations:25.4.0 -> 27.0.2
| | \--- com.android.support:support-core-utils:25.4.0 -> 27.0.2 (*)
| +--- com.google.firebase:firebase-core:11.8.0
| | \--- com.google.firebase:firebase-analytics:11.8.0
| | +--- com.google.android.gms:play-services-basement:11.8.0
| | | +--- com.android.support:support-v4:25.2.0 -> 27.0.2
| | | | +--- com.android.support:support-compat:27.0.2 (*)
| | | | +--- com.android.support:support-media-compat:27.0.2
| | | | | +--- com.android.support:support-annotations:27.0.2
| | | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | | +--- com.android.support:support-core-utils:27.0.2 (*)
| | | | +--- com.android.support:support-core-ui:27.0.2 (*)
| | | | \--- com.android.support:support-fragment:27.0.2 (*)
| | | \--- com.google.android.gms:play-services-basement-license:11.8.0
| | +--- com.google.firebase:firebase-common:11.8.0
| | | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | | +--- com.google.android.gms:play-services-tasks:11.8.0
| | | | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | | | \--- com.google.android.gms:play-services-tasks-license:11.8.0
| | | \--- com.google.firebase:firebase-common-license:11.8.0
| | +--- com.google.firebase:firebase-analytics-impl:11.8.0
| | | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | | +--- com.google.firebase:firebase-iid:11.8.0
| | | | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | | | +--- com.google.firebase:firebase-common:11.8.0 (*)
| | | | +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| | | | \--- com.google.firebase:firebase-iid-license:11.8.0
| | | +--- com.google.firebase:firebase-common:11.8.0 (*)
| | | +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| | | \--- com.google.firebase:firebase-analytics-impl-license:11.8.0
| | \--- com.google.firebase:firebase-analytics-license:11.8.0
| +--- com.google.firebase:firebase-config:11.8.0
| | +--- com.google.android.gms:play-services-base:11.8.0
| | | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | | +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| | | \--- com.google.android.gms:play-services-base-license:11.8.0
| | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | +--- com.google.firebase:firebase-iid:11.8.0 (*)
| | +--- com.google.firebase:firebase-common:11.8.0 (*)
| | +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| | \--- com.google.firebase:firebase-config-license:11.8.0
| +--- com.squareup.retrofit2:retrofit:2.3.0
| | \--- com.squareup.okhttp3:okhttp:3.8.0 -> 3.8.1
| | \--- com.squareup.okio:okio:1.13.0
| +--- com.squareup.retrofit2:converter-gson:2.3.0
| | +--- com.squareup.retrofit2:retrofit:2.3.0 (*)
| | \--- com.google.code.gson:gson:2.7 -> 2.8.2
| +--- com.squareup.retrofit2:adapter-rxjava2:2.3.0
| | +--- com.squareup.retrofit2:retrofit:2.3.0 (*)
| | \--- io.reactivex.rxjava2:rxjava:2.0.0 -> 2.1.6 (*)
| +--- com.squareup.okhttp3:logging-interceptor:3.8.1
| | \--- com.squareup.okhttp3:okhttp:3.8.1 (*)
| \--- com.squareup.okhttp3:okhttp:3.8.1 (*)
+--- com.beloo.widget:ChipsLayoutManager:0.3.7
+--- com.muddzdev:styleabletoast:1.0.9 (*)
+--- com.github.jarrodholliday:material-about-library:1.8.4
| +--- com.android.support:appcompat-v7:25.3.1 -> 27.0.2 (*)
| +--- com.android.support:cardview-v7:25.3.1
| | \--- com.android.support:support-annotations:25.3.1 -> 27.0.2
| +--- com.android.support:design:25.3.1 -> 27.0.2
| | +--- com.android.support:support-v4:27.0.2 (*)
| | +--- com.android.support:appcompat-v7:27.0.2 (*)
| | +--- com.android.support:recyclerview-v7:27.0.2 (*)
| | \--- com.android.support:transition:27.0.2
| | +--- com.android.support:support-annotations:27.0.2
| | \--- com.android.support:support-compat:27.0.2 (*)
| \--- com.android.support.constraint:constraint-layout:1.0.2 -> 1.1.0-beta4
| \--- com.android.support.constraint:constraint-layout-solver:1.1.0-beta4
+--- com.vdurmont:emoji-java:3.2.0
+--- eu.davidea:flexible-adapter:5.0.0-rc2
+--- com.airbnb.android:lottie:2.2.5 (*)
+--- com.android.support.constraint:constraint-layout:1.1.0-beta4 (*)
+--- io.reactivex.rxjava2:rxjava:2.1.6 (*)
+--- io.reactivex.rxjava2:rxandroid:2.0.1 (*)
+--- com.tbruyelle.rxpermissions2:rxpermissions:0.9.4
+--- oxim.digital:rx2anim:0.9.1
| +--- com.android.support:appcompat-v7:25.0.0 -> 27.0.2 (*)
| \--- com.android.support:support-annotations:25.0.0 -> 27.0.2
+--- com.jakewharton.rxbinding2:rxbinding:2.0.0
| +--- io.reactivex.rxjava2:rxjava:2.0.2 -> 2.1.6 (*)
| +--- io.reactivex.rxjava2:rxandroid:2.0.0 -> 2.0.1 (*)
| \--- com.android.support:support-annotations:25.1.1 -> 27.0.2
+--- com.crashlytics.sdk.android:crashlytics:2.6.8 (*)
+--- com.jakewharton.timber:timber:4.6.0
+--- org.slf4j:slf4j-api:1.7.25
+--- com.github.tony19:logback-android-core:1.1.1-6
+--- com.github.tony19:logback-android-classic:1.1.1-6 (*)
+--- com.google.code.gson:gson:2.8.2
+--- com.googlecode.libphonenumber:libphonenumber:8.8.1
+--- com.facebook.android:facebook-android-sdk:4.24.0
| +--- com.android.support:support-v4:25.3.1 -> 27.0.2 (*)
| +--- com.android.support:appcompat-v7:25.3.1 -> 27.0.2 (*)
| +--- com.android.support:cardview-v7:25.3.1 (*)
| \--- com.parse.bolts:bolts-android:1.4.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| \--- com.parse.bolts:bolts-applinks:1.4.0
| \--- com.parse.bolts:bolts-tasks:1.4.0
+--- com.writingminds:FFmpegAndroid:0.3.2
+--- com.google.guava:guava:23.0-android
| +--- com.google.code.findbugs:jsr305:1.3.9 -> 3.0.2
| +--- com.google.errorprone:error_prone_annotations:2.0.18
| +--- com.google.j2objc:j2objc-annotations:1.1
| \--- org.codehaus.mojo:animal-sniffer-annotations:1.14
+--- com.github.bumptech.glide:glide:4.0.0 (*)
+--- jp.wasabeef:glide-transformations:3.0.1 (*)
+--- com.android.support:appcompat-v7:27.0.2 (*)
+--- com.android.support:design:27.0.2 (*)
+--- com.android.support:support-annotations:27.0.2
+--- com.google.firebase:firebase-core:11.8.0 (*)
+--- com.google.firebase:firebase-auth:11.8.0
| +--- com.google.android.gms:play-services-base:11.8.0 (*)
| +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| +--- com.google.firebase:firebase-common:11.8.0 (*)
| +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| \--- com.google.firebase:firebase-auth-license:11.8.0
+--- com.google.firebase:firebase-messaging:11.8.0
| +--- com.google.firebase:firebase-iid:11.8.0 (*)
| +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| +--- com.google.firebase:firebase-common:11.8.0 (*)
| \--- com.google.firebase:firebase-messaging-license:11.8.0
+--- com.google.firebase:firebase-invites:11.8.0
| +--- com.google.android.gms:play-services-appinvite:11.8.0
| | +--- com.google.android.gms:play-services-base:11.8.0 (*)
| | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | +--- com.google.firebase:firebase-dynamic-links:11.8.0
| | | +--- com.google.android.gms:play-services-base:11.8.0 (*)
| | | +--- com.google.android.gms:play-services-basement:11.8.0 (*)
| | | +--- com.google.firebase:firebase-common:11.8.0 (*)
| | | +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| | | \--- com.google.firebase:firebase-dynamic-links-license:11.8.0
| | +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
| | \--- com.google.android.gms:play-services-appinvite-license:11.8.0
| \--- com.google.firebase:firebase-analytics:11.8.0 (*)
+--- com.bluelinelabs:conductor:2.1.4 (*)
+--- com.google.dagger:dagger:2.11 (*)
+--- com.facebook.android:account-kit-sdk:4.24.0
| +--- com.android.support:appcompat-v7:25.3.1 -> 27.0.2 (*)
| +--- com.android.support:design:25.3.1 -> 27.0.2 (*)
| \--- com.android.support:support-v4:25.3.1 -> 27.0.2 (*)
+--- com.google.android.exoplayer:exoplayer-ui:r2.5.1
| +--- com.google.android.exoplayer:exoplayer-core:r2.5.1 (*)
| \--- com.android.support:support-annotations:25.4.0 -> 27.0.2
+--- com.google.android.exoplayer:exoplayer-core:r2.5.1 (*)
+--- com.google.android.exoplayer:exoplayer-dash:r2.5.1 (*)
+--- com.yqritc:android-scalablevideoview:1.0.4
+--- com.github.jarrodholliday:videocache:2.7.1
+--- com.squareup.retrofit2:retrofit:2.3.0 (*)
+--- com.squareup.retrofit2:converter-gson:2.3.0 (*)
+--- com.squareup.retrofit2:adapter-rxjava2:2.3.0 (*)
+--- com.squareup.okhttp3:logging-interceptor:3.8.1 (*)
\--- com.squareup.okhttp3:okhttp:3.8.1 (*)
(*) - dependencies omitted (listed previously)