groovy-extensions/gradle/compile/groovy.gradle

44 lines
1 KiB
Groovy
Raw Normal View History

2021-11-04 16:28:10 +01:00
apply plugin: 'groovy'
dependencies {
2022-06-17 10:53:57 +02:00
implementation libs.groovy.core
testImplementation libs.groovy.core
2021-11-04 16:28:10 +01:00
}
compileGroovy {
2022-04-28 19:07:22 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2022-06-17 10:53:57 +02:00
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
2021-11-04 16:28:10 +01:00
}
compileTestGroovy {
2022-04-28 19:07:22 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2022-06-17 10:53:57 +02:00
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
2021-11-04 16:28:10 +01:00
}
tasks.withType(GroovyCompile) {
options.compilerArgs
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs << '-proc:none'
}
}
2021-12-19 00:37:39 +01:00
task groovydocJar(type: Jar) {
dependsOn groovydoc
2021-11-04 16:28:10 +01:00
from groovydoc.destinationDir
2021-12-19 00:37:39 +01:00
archiveClassifier.set('groovydoc')
}
tasks.assemble.dependsOn(tasks.groovydocJar)
artifacts {
archives groovydocJar
2021-11-04 16:28:10 +01:00
}
2023-05-21 12:46:58 +02:00
sourceSets {
main {
java { srcDirs = [] }
groovy { srcDirs += ['src/main/java'] }
}
}