metrics/gradle/compile/java.gradle

30 lines
612 B
Groovy
Raw Permalink Normal View History

apply plugin: 'java-library'
java {
2023-10-23 17:34:14 +02:00
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
modularity.inferModulePath.set(true)
withSourcesJar()
withJavadocJar()
}
jar {
manifest {
attributes('Implementation-Version': project.version)
}
}
2022-11-03 17:24:27 +01:00
tasks.withType(JavaCompile) {
2023-10-23 17:34:14 +02:00
options.fork = true
options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US']
2022-11-03 17:24:27 +01:00
options.compilerArgs << '-Xlint:all'
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
}