gradle-one-jar
gradle-one-jar copied to clipboard
Changing dependency versions for OneJar project results in both versions included in output
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"
}