gradle-plugins/gradle/compile/java.gradle

30 lines
564 B
Groovy

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')
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}