gradle-plugins/gradle/compile/groovy-dynamic-tests.gradle

31 lines
778 B
Groovy
Raw Permalink Normal View History

2024-01-08 00:38:42 +01:00
apply plugin: 'groovy'
// no groovy dependencies, we must use gradle embedded groovy
compileGroovy {
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
}
compileTestGroovy {
}
tasks.withType(GroovyCompile) {
options.forkOptions.jvmArgs.add('-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true')
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs << '-proc:none'
}
}
task groovydocJar(type: Jar, dependsOn: 'groovydoc') {
from groovydoc.destinationDir
archiveClassifier.set('javadoc')
}
// make java source visible to groovy compiler, suppress sources for java compiler
sourceSets {
main {
java { srcDirs = [] }
groovy { srcDirs += ['src/main/java'] }
}
}