From 7c8d644bbc96d9a973736179cc5826b56396ed07 Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Tue, 7 Jul 2020 11:38:40 +0200 Subject: [PATCH] Fix external javadoc reference to server project (#59000) (#59117) * Fix external javadoc reference to server project This fixes https://github.com/elastic/infra/issues/20103 The problem here is that we rename all artifacts in the :server project to elasticsearch. The ideal fix would be to rename the gradle project there to elasticsearch. I'm open to that but it seems quite invasive. Would love to hear other opinions on that. The applied alternative minimal invasive fix provided with this PR just takes potential renamed projects / artifacts (Currently I only see `:server`) into account when declaring external links. * Simplify javadoc link base name --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0b1760a2e54..ba584155083 100644 --- a/build.gradle +++ b/build.gradle @@ -259,7 +259,8 @@ allprojects { } else { // Link to non-shadowed dependant projects project.javadoc.dependsOn "${upstreamProject.path}:javadoc" - String artifactPath = dep.group.replaceAll('\\.', '/') + '/' + dep.name.replaceAll('\\.', '/') + '/' + dep.version + String externalLinkName = upstreamProject.archivesBaseName + String artifactPath = dep.group.replaceAll('\\.', '/') + '/' + externalLinkName.replaceAll('\\.', '/') + '/' + dep.version project.javadoc.options.linksOffline artifactsHost + "/javadoc/" + artifactPath, "${upstreamProject.buildDir}/docs/javadoc/" } }