From 5683676765c422a407b9502fd9f8f88a5c3d55fc Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 25 Feb 2024 16:32:30 +0100 Subject: [PATCH] Remove hardcoded "--release" from renderJavadoc task (#13132) # Conflicts: # gradle/documentation/render-javadoc.gradle --- gradle/documentation/render-javadoc.gradle | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle index ff7a05a8f087..7c39f8e85673 100644 --- a/gradle/documentation/render-javadoc.gradle +++ b/gradle/documentation/render-javadoc.gradle @@ -55,6 +55,7 @@ allprojects { dependsOn sourceSets.main.compileClasspath classpath = sourceSets.main.compileClasspath srcDirSet = sourceSets.main.java + releaseVersion = rootProject.minJavaVersion outputDir = project.javadoc.destinationDir } @@ -74,6 +75,7 @@ allprojects { dependsOn sourceSets.main.compileClasspath classpath = sourceSets.main.compileClasspath srcDirSet = sourceSets.main.java + releaseVersion = rootProject.minJavaVersion relativeProjectLinks = true @@ -265,7 +267,10 @@ class RenderJavadocTask extends DefaultTask { boolean relativeProjectLinks = false @Input - def offlineLinks = [:] + JavaVersion releaseVersion + + @Input + Map offlineLinks = [:] @Input @Optional @@ -399,7 +404,7 @@ class RenderJavadocTask extends DefaultTask { opts << [ '-linkoffline', url, dir ] } - opts << [ '--release', 11 ] + opts << [ '--release', releaseVersion.toString() ] opts << '-Xdoclint:all,-missing' // Increase Javadoc's heap.