xpipe-mirror/gradle_scripts/java.gradle

31 lines
943 B
Groovy
Raw Normal View History

2022-12-18 17:04:51 +00:00
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
modularity.inferModulePath = true
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked"
options.compilerArgs << "--enable-preview"
2022-12-18 23:31:50 +00:00
// These settings are explicitly specified as they can cause problems with annotation processors
2022-12-18 17:04:51 +00:00
options.compilerArgs << "-implicit:none"
options.incremental = false
}
tasks.withType(JavaExec).configureEach {
modularity.inferModulePath = true
}
javadoc{
source = sourceSets.main.allJava
options {
addStringOption('-release', '19')
addStringOption('link', 'https://docs.oracle.com/en/java/javase/19/docs/api/')
addBooleanOption('html5', true)
addStringOption('Xdoclint:none', '-quiet')
2023-01-01 15:38:52 +00:00
addBooleanOption('-enable-preview', true)
2022-12-18 17:04:51 +00:00
}
}
repositories {
mavenCentral()
}