gradle-plugins/gradle/compile/java.gradle

33 lines
642 B
Groovy
Raw Normal View History

2021-11-09 14:08:25 +01:00
apply plugin: 'java-library'
java {
modularity.inferModulePath.set(true)
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
jar {
manifest {
attributes('Implementation-Version': project.version)
}
}
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xlint:all,-fallthrough')
2022-11-10 10:00:21 +01:00
options.encoding = 'UTF-8'
2021-11-09 14:08:25 +01:00
}
2022-11-10 10:00:21 +01:00
tasks.withType(Javadoc) {
2021-11-09 14:08:25 +01:00
options.addStringOption('Xdoclint:none', '-quiet')
2022-11-10 10:00:21 +01:00
options.encoding = 'UTF-8'
2021-11-09 14:08:25 +01:00
}