dix
03/15/2022, 6:31 PM./gradlew test
from a command line, i see the cache being used for everything including tests, but if I use intellij to run the same gradle task the cache is not respected, is that something others have come acrossVampire
03/15/2022, 7:15 PMdix
03/15/2022, 7:47 PMspand
03/17/2022, 9:44 AMVampire
03/17/2022, 11:07 AMVampire
03/17/2022, 11:07 AMdix
03/17/2022, 8:49 PMVampire
03/17/2022, 10:27 PMString[] ijTestIncludes = ['*']
Class abstractTestTaskClass = null
try {
abstractTestTaskClass = Class.forName("org.gradle.api.tasks.testing.AbstractTestTask")
} catch (ClassNotFoundException ex) {
// ignore, class not available
}
gradle.taskGraph.whenReady { taskGraph ->
taskGraph.allTasks.each { Task task ->
if (task instanceof Test || (abstractTestTaskClass != null && abstractTestTaskClass.isAssignableFrom(task.class))) {
try {
task.outputs.upToDateWhen { false }
String[] strings = ['*']
if(ijTestIncludes != strings) {
def filter = task.getFilter()
filter.setIncludePatterns(new String[0])
ijTestIncludes.each(){ filter.includeTestsMatching "${it}" }
}
}
catch (all) {
logger.error("", all)
}
}
}
}
dix
03/18/2022, 1:48 AMVampire
03/18/2022, 9:35 AM