The primary focus of this change is to address a build cache miss when executing the runtimeHintsTest
task from two different locations. This can be reproduced by running experiment 3 of the the gradle/gradle-enterprise-build-validation-scripts. For example:
./03-validate-local-build-caching-different-locations.sh \
--git-repo https://github.com/spring-projects/spring-framework \
--git-commit-id ac11b03cd3c37121232d0b556fe642103179cdc9 \
--tasks runtimeHintsTest \
--gradle-enterprise-server https://ge.solutions-team.gradle.com
Note: You should omit the --gradle-enterprise-server
parameter if you have permission to publish Build Scans to https://ge.spring.io.
In the resulting Build Scan of the second execution, we can see the runtimeHintsTest
tasks were re-executed. Comparing the two builds, we can see the two executions had differences in the jvmArgs
.
Additionally, I have made two extra changes to:
- Evaluate the
-javaagent
parameter lazily - Remove the cross project task reference to the
jar
task ofspring-core-test
. See Sharing outputs between projects for why and how this is done.
Each change was made in a separate commit.
Comment From: bclozel
Thanks a lot @erichaagdev !