gradle-plugins/gradle/compile/groovy.gradle

37 lines
753 B
Groovy

apply plugin: 'groovy'
// no groovy dependencies, we must use gradle embedded groovy
compileGroovy {
}
compileTestGroovy {
}
tasks.withType(GroovyCompile) {
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs.add('-proc:none')
}
}
task groovydocJar(type: Jar, dependsOn: 'groovydoc') {
from groovydoc.destinationDir
archiveClassifier.set('groovydoc')
}
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'
}