From 5825d2df8333afa44618f7ce27f8179ed9891859 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Wed, 9 Oct 2019 15:42:49 -0700 Subject: [PATCH] Resolve more Gradle task validation warnings (#47825) (cherry picked from commit 82e3d5ea31101f4c27e69162684c3aa4fb2193a4) # Conflicts: # buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy --- .../elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy | 4 ++++ .../gradle/testclusters/ElasticsearchCluster.java | 1 + .../elasticsearch/gradle/testclusters/ElasticsearchNode.java | 1 + 3 files changed, 6 insertions(+) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy index 6a522af12dd..393c93c54e8 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy @@ -23,6 +23,7 @@ import groovy.transform.PackageScope import org.elasticsearch.gradle.doc.SnippetsTask.Snippet import org.gradle.api.InvalidUserDataException import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal import org.gradle.api.tasks.OutputDirectory import java.nio.file.Files @@ -58,6 +59,9 @@ class RestTestsFromSnippetsTask extends SnippetsTask { @OutputDirectory File testRoot = project.file('build/rest') + @Internal + Set names = new HashSet<>() + RestTestsFromSnippetsTask() { project.afterEvaluate { // Wait to set this so testRoot can be customized diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchCluster.java b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchCluster.java index d523d3a88fa..66209caf02a 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchCluster.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchCluster.java @@ -104,6 +104,7 @@ public class ElasticsearchCluster implements TestClusterConfiguration, Named { } } + @Internal ElasticsearchNode getFirstNode() { return nodes.getAt(clusterName + "-0"); } diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java index 729477837b3..323f34c87d6 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java @@ -183,6 +183,7 @@ public class ElasticsearchNode implements TestClusterConfiguration { return distributions.get(currentDistro).getVersion(); } + @Internal public Path getDistroDir() { return workingDir.resolve("distro").resolve(getVersion() + "-" + testDistribution); }