xpipe/gradle/gradle_scripts/java.gradle

34 lines
1,012 B
Groovy
Raw Permalink Normal View History

2022-12-19 06:04:51 +13:00
tasks.withType(JavaCompile).configureEach {
2023-09-27 13:47:51 +13:00
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
2022-12-19 06:04:51 +13:00
modularity.inferModulePath = true
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked"
2023-11-15 16:25:18 +13:00
// options.compilerArgs << "--enable-preview"
2022-12-19 12:31:50 +13:00
// These settings are explicitly specified as they can cause problems with annotation processors
2022-12-19 06:04:51 +13:00
options.compilerArgs << "-implicit:none"
options.incremental = false
}
tasks.withType(JavaExec).configureEach {
modularity.inferModulePath = true
}
javadoc{
source = sourceSets.main.allJava
options {
2023-09-27 13:47:51 +13:00
addStringOption('-release', '21')
addStringOption('link', 'https://docs.oracle.com/en/java/javase/21/docs/api/')
2022-12-19 06:04:51 +13:00
addBooleanOption('html5', true)
addStringOption('Xdoclint:none', '-quiet')
2023-01-02 04:38:52 +13:00
addBooleanOption('-enable-preview', true)
2022-12-19 06:04:51 +13:00
}
}
repositories {
mavenCentral()
2023-01-27 15:34:46 +13:00
flatDir {
dirs "$rootDir/gradle/gradle_scripts"
}
2022-12-19 06:04:51 +13:00
}