Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ plugins {
}

repositories {
mavenLocal()
mavenCentral()
maven { url = "https://central.sonatype.com/repository/maven-snapshots/" }
gradlePluginPortal()
Expand Down Expand Up @@ -95,14 +96,11 @@ tasks.withType(JavaCompile).configureEach {
options.forkOptions.jvmArgs += "-Xmx6g"
options.compilerArgs << "-Werror"
// "-processing" avoids javac warning "No processor claimed any of these annotations".
// "-options" is because of JDK 21 warning "source value 8 is obsolete..."
if (isJava21orHigher) {
options.compilerArgs << "-Xlint:all,-processing,-options,-this-escape"
options.compilerArgs << "-Xlint:all,-processing,-this-escape"
} else {
options.compilerArgs << "-Xlint:all,-processing,-options"
options.compilerArgs << "-Xlint:all,-processing"
}
// // Only needed when debugging.
// options.compilerArgs << "-g"
}
if (isJava21orHigher) {
apply plugin: "net.ltgt.errorprone"
Expand Down Expand Up @@ -205,7 +203,7 @@ javadoc {
}
check.dependsOn(javadoc)

tasks.register("javadocWeb", DefaultTask) {
tasks.register("javadocWeb", Javadoc) {
description = "Upload API documentation to website."
dependsOn(javadocWebUpload, javadocWebChgrp, javadocWebChmod)
}
Expand Down Expand Up @@ -240,12 +238,13 @@ configurations {
dependencies {
requireJavadoc("org.plumelib:require-javadoc:2.0.0")
}
tasks.register("requireJavadoc", JavaExec) {
def requireJavadoc = tasks.register("requireJavadoc", JavaExec) {
group = "Documentation"
description = "Ensures that Javadoc documentation exists."
inputs.files(sourceSets.main.allJava)
mainClass = "org.plumelib.javadoc.RequireJavadoc"
classpath = configurations.requireJavadoc
args("src/main/java")
args(sourceSets.main.allJava.srcDirs.collect{it.getAbsolutePath()})
jvmArgs += [
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
Expand Down