groovy-extensions/gradle/compile/groovy.gradle

39 lines
834 B
Groovy

apply plugin: 'groovy'
dependencies {
implementation libs.groovy.core
testImplementation libs.groovy.core
}
compileGroovy {
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
}
compileTestGroovy {
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
}
tasks.withType(GroovyCompile) {
options.compilerArgs
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs << '-proc:none'
}
}
task groovydocJar(type: Jar) {
dependsOn groovydoc
from groovydoc.destinationDir
archiveClassifier.set('groovydoc')
}
tasks.assemble.dependsOn(tasks.groovydocJar)
artifacts {
archives groovydocJar
}
sourceSets {
main {
java { srcDirs = [] }
groovy { srcDirs += ['src/main/java'] }
}
}