Resolve more Gradle task validation warnings (#47825)
(cherry picked from commit 82e3d5ea31101f4c27e69162684c3aa4fb2193a4) # Conflicts: # buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy
This commit is contained in:
parent
0360a18f61
commit
5825d2df83
|
@ -23,6 +23,7 @@ import groovy.transform.PackageScope
|
||||||
import org.elasticsearch.gradle.doc.SnippetsTask.Snippet
|
import org.elasticsearch.gradle.doc.SnippetsTask.Snippet
|
||||||
import org.gradle.api.InvalidUserDataException
|
import org.gradle.api.InvalidUserDataException
|
||||||
import org.gradle.api.tasks.Input
|
import org.gradle.api.tasks.Input
|
||||||
|
import org.gradle.api.tasks.Internal
|
||||||
import org.gradle.api.tasks.OutputDirectory
|
import org.gradle.api.tasks.OutputDirectory
|
||||||
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
@ -58,6 +59,9 @@ class RestTestsFromSnippetsTask extends SnippetsTask {
|
||||||
@OutputDirectory
|
@OutputDirectory
|
||||||
File testRoot = project.file('build/rest')
|
File testRoot = project.file('build/rest')
|
||||||
|
|
||||||
|
@Internal
|
||||||
|
Set<String> names = new HashSet<>()
|
||||||
|
|
||||||
RestTestsFromSnippetsTask() {
|
RestTestsFromSnippetsTask() {
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
// Wait to set this so testRoot can be customized
|
// Wait to set this so testRoot can be customized
|
||||||
|
|
|
@ -104,6 +104,7 @@ public class ElasticsearchCluster implements TestClusterConfiguration, Named {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Internal
|
||||||
ElasticsearchNode getFirstNode() {
|
ElasticsearchNode getFirstNode() {
|
||||||
return nodes.getAt(clusterName + "-0");
|
return nodes.getAt(clusterName + "-0");
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ public class ElasticsearchNode implements TestClusterConfiguration {
|
||||||
return distributions.get(currentDistro).getVersion();
|
return distributions.get(currentDistro).getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Internal
|
||||||
public Path getDistroDir() {
|
public Path getDistroDir() {
|
||||||
return workingDir.resolve("distro").resolve(getVersion() + "-" + testDistribution);
|
return workingDir.resolve("distro").resolve(getVersion() + "-" + testDistribution);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue