Use Javadoc tool from JAVA_HOME (#26330)
We currently run the javadoc executable from the JDK that runs Gradle, not the JDK from JAVA_HOME. Relates to #24733
This commit is contained in:
parent
73dff6d21f
commit
cfff71aa64
|
@ -42,6 +42,7 @@ import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||||
import org.gradle.api.publish.maven.tasks.GenerateMavenPom
|
import org.gradle.api.publish.maven.tasks.GenerateMavenPom
|
||||||
import org.gradle.api.tasks.bundling.Jar
|
import org.gradle.api.tasks.bundling.Jar
|
||||||
import org.gradle.api.tasks.compile.JavaCompile
|
import org.gradle.api.tasks.compile.JavaCompile
|
||||||
|
import org.gradle.api.tasks.javadoc.Javadoc
|
||||||
import org.gradle.internal.jvm.Jvm
|
import org.gradle.internal.jvm.Jvm
|
||||||
import org.gradle.process.ExecResult
|
import org.gradle.process.ExecResult
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
|
@ -456,6 +457,9 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
static void configureJavadoc(Project project) {
|
static void configureJavadoc(Project project) {
|
||||||
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
|
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
|
project.tasks.withType(Javadoc) {
|
||||||
|
executable = new File(project.javaHome, 'bin/javadoc')
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Order matters, the linksOffline for org.elasticsearch:elasticsearch must be the last one
|
* Order matters, the linksOffline for org.elasticsearch:elasticsearch must be the last one
|
||||||
* or all the links for the other packages (e.g org.elasticsearch.client) will point to core rather than their own artifacts
|
* or all the links for the other packages (e.g org.elasticsearch.client) will point to core rather than their own artifacts
|
||||||
|
|
Loading…
Reference in New Issue