graphics/gradle/compile/java.gradle

35 lines
680 B
Groovy
Raw Permalink Normal View History

apply plugin: 'java-library'
java {
modularity.inferModulePath.set(true)
2023-05-26 10:11:40 +02:00
withSourcesJar()
withJavadocJar()
}
compileJava {
2022-04-29 17:14:15 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileTestJava {
2022-04-29 17:14:15 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
manifest {
attributes('Implementation-Version': project.version)
}
}
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xlint:all,-exports')
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
}