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")) {
|
2022-02-19 23:05:50 +01:00
|
|
|
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
|
2021-12-19 00:47:12 +01:00
|
|
|
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'
|
|
|
|
}
|