guava/gradle/compile/java.gradle

35 lines
671 B
Groovy
Raw Permalink Normal View History

2021-03-07 20:44:20 +01:00
apply plugin: 'java-library'
java {
modularity.inferModulePath.set(true)
2023-05-25 16:30:30 +02:00
withJavadocJar()
withSourcesJar()
2021-03-07 20:44:20 +01:00
}
compileJava {
2023-05-25 16:30:30 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2021-03-07 20:44:20 +01:00
}
compileTestJava {
2023-05-25 16:30:30 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2021-03-07 20:44:20 +01:00
}
jar {
manifest {
attributes('Implementation-Version': project.version)
}
}
2021-03-18 22:19:14 +01:00
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xlint:all')
options.encoding = 'UTF-8'
2021-03-18 22:19:14 +01:00
}
tasks.withType(Javadoc) {
2021-03-18 22:19:14 +01:00
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
2021-03-18 22:19:14 +01:00
}