groovy-extensions/gradle/compile/java.gradle

33 lines
604 B
Groovy
Raw Normal View History

2021-11-04 16:28:10 +01:00
apply plugin: 'java-library'
java {
modularity.inferModulePath.set(true)
2023-05-21 12:46:58 +02:00
withSourcesJar()
withJavadocJar()
2021-11-04 16:28:10 +01:00
}
compileJava {
2022-04-28 19:07:22 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2021-11-04 16:28:10 +01:00
}
compileTestJava {
2022-04-28 19:07:22 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2021-11-04 16:28:10 +01:00
}
jar {
manifest {
attributes('Implementation-Version': project.version)
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:all,-fallthrough'
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}