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

30 lines
778 B
Groovy

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'] }
}
}