I’m trying to debug some behaviour that I can’t quite understand, using Gradle 8.4 and Java 17.
My project contains several subprojects with associated “test” tasks. They execute as expected, Java sources are compiled, tests are run, coverage is computed, etc.
If I delete the subproject/build/ directory, things start to get strange.
With build cache disabled:
rm subproject/build -r./gradlew subproject:testresults in test execution, as expected./gradlew subproject:testresults in “UP-TO-DATE”, as expected
With build cache enabled:
rm subproject/build -r./gradlew subproject:testresults in “NO-SOURCE”
If I now delete ~/.gradle/caches/, I get this (with build cache enabled):
rm ~/.gradle/caches -rfollowed by./gradlew --stoprm subproject/build -r./gradlew subproject:testresults in test execution, as expected./gradlew subproject:testresults in “UP-TO-DATE”, as expected
I first noticed this strange behaviour after I aborted builds (CTRL+C). Subsequent builds failed for unknown reasons, which I believe are related to the “reproducer” described above.
Why does this “NO-SOURCE” appear? What can I do to further (help) debug this?