Skip to content

Commit fe599d2

Browse files
committed
Port #2943
1 parent 0eadc3b commit fe599d2

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

buildSrc/src/main/kotlin/net/dv8tion/jda/tasks/javadocs.kt

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,9 @@ fun Project.configureJavadoc(
2727
val effectiveJdkDocsVersion = max(11, targetVersion.majorVersion.toInt())
2828
links("https://docs.oracle.com/en/java/javase/${effectiveJdkDocsVersion}/docs/api/", "https://takahikokawasaki.github.io/nv-websocket-client/")
2929

30-
val javaVersion = JavaVersion.current()
31-
if (JavaVersion.VERSION_1_8 < javaVersion) {
32-
addBooleanOption("html5", true) // Adds search bar
33-
addStringOption("-release", targetVersion.majorVersion)
34-
}
35-
36-
// Fix for https://stackoverflow.com/questions/52326318/maven-javadoc-search-redirects-to-undefined-url
37-
if (javaVersion in JavaVersion.VERSION_11..JavaVersion.VERSION_12) {
38-
addBooleanOption("-no-module-directories", true)
39-
}
40-
41-
// Java 13 changed accessibility rules.
42-
// On versions less than Java 13, we simply ignore the errors.
43-
// Both of these remove "no comment" warnings.
44-
if (javaVersion >= JavaVersion.VERSION_13) {
45-
addBooleanOption("Xdoclint:all,-missing", true)
46-
} else {
47-
addBooleanOption("Xdoclint:all,-missing,-accessibility", true)
48-
}
30+
addBooleanOption("html5", true) // Adds search bar
31+
addStringOption("-release", targetVersion.majorVersion)
32+
addBooleanOption("Xdoclint:all,-missing", true)
4933

5034
overview = overviewFile
5135
}

opus-jna/build.gradle.kts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ base {
3838
}
3939

4040
java {
41-
sourceCompatibility = JavaVersion.VERSION_1_8
42-
targetCompatibility = JavaVersion.VERSION_1_8
43-
4441
withSourcesJar()
4542
}
4643

@@ -108,10 +105,7 @@ tasks.withType<JavaCompile> {
108105

109106
val args = mutableListOf("-Xlint:deprecation", "-Xlint:unchecked")
110107

111-
if (JavaVersion.current().isJava9Compatible) {
112-
args.add("--release")
113-
args.add("8")
114-
}
108+
options.release = 8
115109

116110
options.compilerArgs.addAll(args)
117111
}

0 commit comments

Comments
 (0)