guice/gradle/compile/java.gradle

34 lines
621 B
Groovy
Raw Permalink Normal View History

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