Skip to content

Instantly share code, notes, and snippets.

@nealeu
Created June 12, 2024 07:59
Show Gist options
  • Save nealeu/d8a5e838a375533c05d6453869eba473 to your computer and use it in GitHub Desktop.
Save nealeu/d8a5e838a375533c05d6453869eba473 to your computer and use it in GitHub Desktop.
Parallel sourceset for Gradle Groovy build avoidance
sourceSets {
testWip {
groovy {
srcDirs = ['src/test/groovyWip']
compileClasspath = sourceSets.test.compileClasspath + sourceSets.main.compileClasspath
runtimeClasspath = sourceSets.test.runtimeClasspath + sourceSets.main.runtimeClasspath
}
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
systemProperty 'user.timezone', 'UTC'
// add separate sourceset to existing test task so that we can move WIP tests here
// to avoid recompile of all groovy tests
sourceSets.add(sourceSets.testWip)
testClassesDirs += sourceSets.testWip.output.classesDirs
classpath += sourceSets.testWip.output
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment