gradle-plugins/gradle/compile/groovy.gradle

38 lines
753 B
Groovy
Raw Permalink Normal View History

2021-11-09 14:08:25 +01:00
apply plugin: 'groovy'
2024-01-08 00:38:42 +01:00
// no groovy dependencies, we must use gradle embedded groovy
compileGroovy {
2021-11-09 14:08:25 +01:00
}
2024-01-08 00:38:42 +01:00
compileTestGroovy {
2021-11-09 14:08:25 +01:00
}
tasks.withType(GroovyCompile) {
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs.add('-proc:none')
2021-11-09 14:08:25 +01:00
}
}
2024-01-08 00:38:42 +01:00
task groovydocJar(type: Jar, dependsOn: 'groovydoc') {
2021-11-09 14:08:25 +01:00
from groovydoc.destinationDir
archiveClassifier.set('groovydoc')
}
2024-01-08 00:38:42 +01:00
artifacts {
archives groovydocJar
}
// make java source visible to groovy compiler, suppress sources for java compiler
sourceSets {
main {
java { srcDirs = [] }
groovy { srcDirs += ['src/main/java'] }
}
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
}