datastructures/gradle/compile/java.gradle

31 lines
699 B
Groovy
Raw Normal View History

2020-09-12 22:42:03 +02:00
apply plugin: 'java-library'
java {
2023-09-30 22:59:12 +02:00
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
2020-09-12 22:42:03 +02:00
modularity.inferModulePath.set(true)
withSourcesJar()
withJavadocJar()
2020-09-12 22:42:03 +02:00
}
jar {
manifest {
attributes('Implementation-Version': project.version)
2023-09-30 22:59:12 +02:00
attributes('X-Java-Compiler-Version': JavaLanguageVersion.of(21).toString())
2020-09-12 22:42:03 +02:00
}
}
2021-04-08 22:36:40 +02:00
tasks.withType(JavaCompile) {
2023-09-30 22:59:12 +02:00
options.fork = true
options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US']
options.compilerArgs.add('-Xlint:all')
options.encoding = 'UTF-8'
2021-04-08 22:36:40 +02:00
}
2020-09-12 22:42:03 +02:00
tasks.withType(Javadoc) {
2020-09-12 22:42:03 +02:00
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
2020-09-12 22:42:03 +02:00
}