2021-11-04 16:28:10 +01:00
|
|
|
|
|
|
|
apply plugin: 'java-library'
|
|
|
|
|
|
|
|
java {
|
2024-01-07 15:41:55 +01:00
|
|
|
toolchain {
|
|
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
|
|
}
|
2021-11-04 16:28:10 +01:00
|
|
|
modularity.inferModulePath.set(true)
|
2023-05-21 12:46:58 +02:00
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
2021-11-04 16:28:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes('Implementation-Version': project.version)
|
2024-01-07 15:41:55 +01:00
|
|
|
attributes('X-Java-Compiler-Version': JavaLanguageVersion.of(21).toString())
|
2021-11-04 16:28:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
2024-01-07 15:41:55 +01:00
|
|
|
options.fork = true
|
|
|
|
options.forkOptions.jvmArgs += [
|
|
|
|
'-Duser.language=en',
|
|
|
|
'-Duser.country=US',
|
|
|
|
]
|
|
|
|
options.compilerArgs += [
|
|
|
|
'-Xlint:all'
|
|
|
|
]
|
|
|
|
options.encoding = 'UTF-8'
|
2021-11-04 16:28:10 +01:00
|
|
|
}
|
|
|
|
|
2024-01-07 15:41:55 +01:00
|
|
|
tasks.withType(Javadoc) {
|
2021-11-04 16:28:10 +01:00
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
2024-01-07 15:41:55 +01:00
|
|
|
options.encoding = 'UTF-8'
|
2021-11-04 16:28:10 +01:00
|
|
|
}
|