gradle-one-jar icon indicating copy to clipboard operation
gradle-one-jar copied to clipboard

Changing dependency versions for OneJar project results in both versions included in output

Open boblloyd opened this issue 10 years ago • 0 comments

When you have a dependency on a 3rd party product (say, spring-core), and you change from 3.1.1 to 4.0.5, for example, the output OneJar contains both spring-core-3.1.1.jar and spring-core-4.0.5.jar.

This is because the one-jar-build directory isn't cleaned when the OneJar is rebuilt.

A workaround would be:

onejar.doFirst{
     delete "$buildDir/one-jar-build"
}

boblloyd avatar Jan 22 '15 20:01 boblloyd