database/gradle/compile/java.gradle

30 lines
605 B
Groovy
Raw Normal View History

2022-02-10 18:41:26 +01:00
apply plugin: 'java-library'
java {
2023-10-17 16:32:20 +02:00
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
2022-02-10 18:41:26 +01:00
modularity.inferModulePath.set(true)
withSourcesJar()
withJavadocJar()
2022-02-10 18:41:26 +01:00
}
jar {
manifest {
attributes('Implementation-Version': project.version)
}
}
tasks.withType(JavaCompile) {
2023-10-17 16:32:20 +02:00
options.fork = true
options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US']
2024-06-12 22:56:01 +02:00
options.compilerArgs << '-Xlint:all,-exports'
2023-10-17 16:32:20 +02:00
options.encoding = 'UTF-8'
2022-02-10 18:41:26 +01:00
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
2023-10-17 16:32:20 +02:00
options.encoding = 'UTF-8'
2022-02-10 18:41:26 +01:00
}