Hello guys.
I have faced a strange behavior of plugin-dependencies management.
I have the project with the following structure:
|root_project|
…build.gradle
…|sub_project|
…build.gradle
In |root_project|/build.gradle I have a plugin dependency on Bintray uploader plugin:
buildscript { repositories { jcenter() } dependencies { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' } }
apply plugin: ‘com.jfrog.bintray’
In |sub_project|/build.gradle I have a plugin dependency on Shadow-plugin:
buildscript { repositories { jcenter() } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' } }
apply plugin: 'com.github.johnrengelman.shadow'
And when I attempt to execute “shadowJar” task I get the following [exception] (Exception Gradle - Pastebin.com).
It seems to me that it caused by the two different underlying versions of the same library (Apache Ant Core) in plugin “bintray” and plugin “shadow”.
If I disable a “bintray” plugin the "shadow"ing passes successfully. I guess that you load all the libraries with the same class-loader so the problem class (org.apache.tools.zip.ZipOutputStream) is loaded firstly.
How to avoid this?