I have a test task that I always want to be executed, so I added outputs.upToDateWhen { false }. But it’s still always being marked as UP-TO-DATE.
‘’’ task myTest(type: Test) {
outputs.upToDateWhen { false }
if (allSystemProperties != null) {
allSystemProperties.propertyNames().each {
systemProperty it, allSystemProperties.getProperty(it)
}
}
include “tests/MyTest.class” } ‘’’
I’m using Gradle 1.12. Running ‘gradle clean myTest’ or ‘gradle cleanTest myTest’ always says myTest is UP-TO-Date.