Created
June 12, 2024 07:59
-
-
Save nealeu/d8a5e838a375533c05d6453869eba473 to your computer and use it in GitHub Desktop.
Parallel sourceset for Gradle Groovy build avoidance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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