I'm new to builds using gradle. At the moment I try to implement a build of project B that uses the build result of project A, that is deployed to artifactory. I'm using Gradle 2.2. Details:
Project A's build.gradle contains:
version = '1.0.0-SNAPSHOT'
group = 'at.mic.projectA'
Applying plugin 'maven' leads to a new artifact like at.mic.projectA-1.0.0-20150624.073846-2.jar (and .pom) in artifatory each time project A is build.
Project B's build.gradle contains:
dependencies {
compile group: 'at.mic.projectA', name: 'at.mic.projectA', version:'1.0.0+'
...
}
'at.mic.at.mic.projectA', version:'1.0.0+' When project B is build for the first time, this dependency is resolved correctly and the newest at.mic.projectA-*.jar is downloaded from artifactory.
If I change some source of project A and re-build it I would expect two things during build of project B:
- download of newest artifact at.mic.projectA-*.jar and
- re-compilation of project B.
Unfortunatelly this doesn't happen. Even if I delete the contents of user_home/caches to force use of new artifacts, these were downloaded but gradle doesn't re-compile project B - it writes to log:
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:uploadArchives
Is there something wrong with my configuration? Thanks in advance!
Frank
Solution was provided in Ben's comment:
It sounds like you need to change the default cache settings for dynamic versions
Thx, Ben