mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
* Update Gradle Wrapper to 8.2 (#96686) - Convention usage has been deprecated and was fixed in our build files - Fix test dependencies and deprecation
This commit is contained in:
parent
4bec04037b
commit
5afd06ae57
100 changed files with 648 additions and 206 deletions
|
@ -10,10 +10,15 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
|
||||
apply plugin: 'elasticsearch.java'
|
||||
apply plugin: 'application'
|
||||
mainClassName = 'org.openjdk.jmh.Main'
|
||||
|
||||
application {
|
||||
mainClass = 'org.openjdk.jmh.Main'
|
||||
}
|
||||
|
||||
tasks.named("assemble").configure { enabled = false }
|
||||
archivesBaseName = 'elasticsearch-benchmarks'
|
||||
base {
|
||||
archivesName = 'elasticsearch-benchmarks'
|
||||
}
|
||||
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
||||
|
|
|
@ -15,9 +15,11 @@ plugins {
|
|||
}
|
||||
|
||||
group = "org.elasticsearch"
|
||||
|
||||
// This project contains Checkstyle rule implementations used by IDEs which use a Java 11 runtime
|
||||
java {
|
||||
targetCompatibility = 11
|
||||
sourceCompatibility = 11
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
// We already configure publication and we don't need or want the one that comes
|
||||
|
|
|
@ -12,12 +12,16 @@ import org.gradle.api.Action;
|
|||
import org.gradle.api.GradleException;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.file.FileTree;
|
||||
import org.gradle.api.initialization.IncludedBuild;
|
||||
import org.gradle.api.invocation.Gradle;
|
||||
import org.gradle.api.plugins.JavaPluginExtension;
|
||||
import org.gradle.api.tasks.SourceSet;
|
||||
import org.gradle.api.tasks.SourceSetContainer;
|
||||
import org.gradle.api.tasks.util.PatternFilterable;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
@ -102,7 +106,6 @@ public class Util {
|
|||
return project.getExtensions().getByType(JavaPluginExtension.class) == null;
|
||||
}
|
||||
|
||||
|
||||
public static Object toStringable(Supplier<String> getter) {
|
||||
return new Object() {
|
||||
@Override
|
||||
|
@ -116,4 +119,31 @@ public class Util {
|
|||
return project.getExtensions().getByType(JavaPluginExtension.class).getSourceSets();
|
||||
}
|
||||
|
||||
public static File locateElasticsearchWorkspace(Gradle gradle) {
|
||||
if(gradle.getRootProject().getName().startsWith("build-tools")) {
|
||||
File buildToolsParent = gradle.getRootProject().getRootDir().getParentFile();
|
||||
if(versionFileExists(buildToolsParent)) {
|
||||
return buildToolsParent;
|
||||
}
|
||||
return buildToolsParent;
|
||||
}
|
||||
if (gradle.getParent() == null) {
|
||||
// See if any of these included builds is the Elasticsearch gradle
|
||||
for (IncludedBuild includedBuild : gradle.getIncludedBuilds()) {
|
||||
if (versionFileExists(includedBuild.getProjectDir())) {
|
||||
return includedBuild.getProjectDir();
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise assume this gradle is the root elasticsearch workspace
|
||||
return gradle.getRootProject().getRootDir();
|
||||
} else {
|
||||
// We're an included build, so keep looking
|
||||
return locateElasticsearchWorkspace(gradle.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean versionFileExists(File rootDir) {
|
||||
return new File(rootDir, "build-tools-internal/version.properties").exists();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,8 +184,10 @@ gradlePlugin {
|
|||
*****************************************************************************/
|
||||
|
||||
def minCompilerJava = versions.get("minimumCompilerJava")
|
||||
java {
|
||||
targetCompatibility = minCompilerJava
|
||||
sourceCompatibility = minCompilerJava
|
||||
}
|
||||
|
||||
if (JavaVersion.current() < JavaVersion.toVersion(minCompilerJava)) {
|
||||
throw new GradleException("Java ${minCompilerJava} is required to build Elasticsearch but current Java is version ${JavaVersion.current()}.")
|
||||
|
@ -241,7 +243,6 @@ dependencies {
|
|||
api buildLibs.commons.codec
|
||||
api buildLibs.apache.compress
|
||||
api buildLibs.ant
|
||||
api 'com.netflix.nebula:gradle-extra-configurations-plugin:7.0.0'
|
||||
api buildLibs.nebula.info
|
||||
api buildLibs.apache.rat
|
||||
api buildLibs.jna
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
||||
distributionSha256Sum=5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionSha256Sum=db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219
|
||||
|
|
|
@ -16,6 +16,7 @@ subprojects {
|
|||
archiveVersion.set("${versionFromBranch}-SNAPSHOT")
|
||||
archiveClassifier.set("darwin-x86_64")
|
||||
archiveExtension.set('tar.gz')
|
||||
exclude('build')
|
||||
}
|
||||
|
||||
tasks.register('extracted', Copy) {
|
||||
|
|
|
@ -32,7 +32,8 @@ configure(allprojects) {
|
|||
}
|
||||
project.tasks.withType(Test).configureEach { Test test ->
|
||||
if (BuildParams.getIsRuntimeJavaHomeSet()) {
|
||||
test.executable = "${BuildParams.runtimeJavaHome}/bin/java"
|
||||
test.executable = "${BuildParams.runtimeJavaHome}/bin/java" +
|
||||
(OS.current() == OS.WINDOWS ? '.exe' : '')
|
||||
} else {
|
||||
test.dependsOn(project.jdks.provisioned_runtime)
|
||||
test.executable = project.jdks.provisioned_runtime.getBinJavaPath()
|
||||
|
|
|
@ -51,10 +51,12 @@ public class ElasticsearchJavadocPlugin implements Plugin<Project> {
|
|||
var withShadowPlugin = project1.getPlugins().hasPlugin(ShadowPlugin.class);
|
||||
var compileClasspath = project.getConfigurations().getByName("compileClasspath");
|
||||
|
||||
var copiedCompileClasspath = project.getConfigurations().create("copiedCompileClasspath");
|
||||
copiedCompileClasspath.extendsFrom(compileClasspath);
|
||||
if (withShadowPlugin) {
|
||||
var shadowConfiguration = project.getConfigurations().getByName("shadow");
|
||||
var shadowedDependencies = shadowConfiguration.getAllDependencies();
|
||||
var nonShadowedCompileClasspath = compileClasspath.copyRecursive(
|
||||
var nonShadowedCompileClasspath = copiedCompileClasspath.copyRecursive(
|
||||
dependency -> shadowedDependencies.contains(dependency) == false
|
||||
);
|
||||
configureJavadocForConfiguration(project, false, nonShadowedCompileClasspath);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
package org.elasticsearch.gradle.internal;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.Configuration;
|
||||
import org.gradle.api.artifacts.Dependency;
|
||||
import org.gradle.api.artifacts.dsl.DependencyHandler;
|
||||
import org.gradle.api.plugins.BasePluginExtension;
|
||||
|
@ -40,9 +41,18 @@ public class InternalTestArtifactExtension {
|
|||
|
||||
DependencyHandler dependencies = project.getDependencies();
|
||||
project.getPlugins().withType(JavaPlugin.class, javaPlugin -> {
|
||||
Configuration apiElements = project.getConfigurations().getByName(sourceSet.getApiElementsConfigurationName());
|
||||
Configuration apiElementsTestArtifacts = project.getConfigurations()
|
||||
.create(sourceSet.getApiConfigurationName() + "TestArtifacts");
|
||||
apiElements.extendsFrom(apiElementsTestArtifacts);
|
||||
Dependency projectDependency = dependencies.create(project);
|
||||
dependencies.add(sourceSet.getApiElementsConfigurationName(), projectDependency);
|
||||
dependencies.add(sourceSet.getRuntimeElementsConfigurationName(), projectDependency);
|
||||
dependencies.add(apiElementsTestArtifacts.getName(), projectDependency);
|
||||
|
||||
Configuration runtimeElements = project.getConfigurations().getByName(sourceSet.getRuntimeElementsConfigurationName());
|
||||
Configuration runtimeElementsTestArtifacts = project.getConfigurations()
|
||||
.create(sourceSet.getRuntimeElementsConfigurationName() + "TestArtifacts");
|
||||
runtimeElements.extendsFrom(runtimeElementsTestArtifacts);
|
||||
dependencies.add(runtimeElementsTestArtifacts.getName(), projectDependency);
|
||||
});
|
||||
// PolicyUtil doesn't handle classifier notation well probably.
|
||||
// Instead of fixing PoliceUtil we stick to the pattern of changing
|
||||
|
|
|
@ -8,14 +8,19 @@
|
|||
package org.elasticsearch.gradle.internal.info;
|
||||
|
||||
import org.elasticsearch.gradle.internal.BwcVersions;
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.JavaVersion;
|
||||
import org.gradle.api.Task;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.jvm.toolchain.JavaToolchainSpec;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
@ -28,6 +33,7 @@ public class BuildParams {
|
|||
private static JavaVersion minimumRuntimeVersion;
|
||||
private static JavaVersion gradleJavaVersion;
|
||||
private static JavaVersion runtimeJavaVersion;
|
||||
private static Provider<? extends Action<JavaToolchainSpec>> javaToolChainSpec;
|
||||
private static String runtimeJavaDetails;
|
||||
private static Boolean inFipsJvm;
|
||||
private static String gitRevision;
|
||||
|
@ -87,6 +93,10 @@ public class BuildParams {
|
|||
return value(inFipsJvm);
|
||||
}
|
||||
|
||||
public static void withFipsEnabledOnly(Task task) {
|
||||
task.onlyIf("FIPS mode disabled", task1 -> isInFipsJvm() == false);
|
||||
}
|
||||
|
||||
public static String getGitRevision() {
|
||||
return value(gitRevision);
|
||||
}
|
||||
|
@ -107,10 +117,18 @@ public class BuildParams {
|
|||
return value(testSeed);
|
||||
}
|
||||
|
||||
public static Random getRandom() {
|
||||
return new Random(Long.parseUnsignedLong(testSeed.split(":")[0], 16));
|
||||
}
|
||||
|
||||
public static Boolean isCi() {
|
||||
return value(isCi);
|
||||
}
|
||||
|
||||
public static Boolean isGraalVmRuntime() {
|
||||
return value(runtimeJavaDetails.toLowerCase().contains("graalvm"));
|
||||
}
|
||||
|
||||
public static Integer getDefaultParallel() {
|
||||
return value(defaultParallel);
|
||||
}
|
||||
|
@ -119,6 +137,10 @@ public class BuildParams {
|
|||
return value(BuildParams.isSnapshotBuild);
|
||||
}
|
||||
|
||||
public static Provider<? extends Action<JavaToolchainSpec>> getJavaToolChainSpec() {
|
||||
return javaToolChainSpec;
|
||||
}
|
||||
|
||||
private static <T> T value(T object) {
|
||||
if (object == null) {
|
||||
String callingMethod = Thread.currentThread().getStackTrace()[2].getMethodName();
|
||||
|
@ -161,7 +183,11 @@ public class BuildParams {
|
|||
}
|
||||
|
||||
public void setRuntimeJavaHome(File runtimeJavaHome) {
|
||||
BuildParams.runtimeJavaHome = requireNonNull(runtimeJavaHome);
|
||||
try {
|
||||
BuildParams.runtimeJavaHome = requireNonNull(runtimeJavaHome).getCanonicalFile();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setIsRuntimeJavaHomeSet(boolean isRutimeJavaHomeSet) {
|
||||
|
@ -227,5 +253,9 @@ public class BuildParams {
|
|||
public void setBwcVersions(Provider<BwcVersions> bwcVersions) {
|
||||
BuildParams.bwcVersions = requireNonNull(bwcVersions);
|
||||
}
|
||||
|
||||
public void setJavaToolChainSpec(Provider<? extends Action<JavaToolchainSpec>> javaToolChain) {
|
||||
BuildParams.javaToolChainSpec = javaToolChain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,21 +12,32 @@ import org.elasticsearch.gradle.internal.BwcVersions;
|
|||
import org.elasticsearch.gradle.internal.conventions.info.GitInfo;
|
||||
import org.elasticsearch.gradle.internal.conventions.info.ParallelDetector;
|
||||
import org.elasticsearch.gradle.internal.conventions.util.Util;
|
||||
import org.elasticsearch.gradle.util.GradleUtils;
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.GradleException;
|
||||
import org.gradle.api.JavaVersion;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.logging.Logger;
|
||||
import org.gradle.api.logging.Logging;
|
||||
import org.gradle.api.model.ObjectFactory;
|
||||
import org.gradle.api.plugins.JvmToolchainsPlugin;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.provider.ProviderFactory;
|
||||
import org.gradle.internal.jvm.Jvm;
|
||||
import org.gradle.internal.jvm.inspection.JavaInstallationRegistry;
|
||||
import org.gradle.internal.jvm.inspection.JvmInstallationMetadata;
|
||||
import org.gradle.internal.jvm.inspection.JvmMetadataDetector;
|
||||
import org.gradle.internal.jvm.inspection.JvmVendor;
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion;
|
||||
import org.gradle.jvm.toolchain.JavaLauncher;
|
||||
import org.gradle.jvm.toolchain.JavaToolchainService;
|
||||
import org.gradle.jvm.toolchain.JavaToolchainSpec;
|
||||
import org.gradle.jvm.toolchain.JvmVendorSpec;
|
||||
import org.gradle.jvm.toolchain.internal.InstallationLocation;
|
||||
import org.gradle.jvm.toolchain.internal.JavaInstallationRegistry;
|
||||
import org.gradle.util.GradleVersion;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
@ -41,6 +52,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -49,21 +61,25 @@ import javax.inject.Inject;
|
|||
public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
||||
private static final Logger LOGGER = Logging.getLogger(GlobalBuildInfoPlugin.class);
|
||||
private static final String DEFAULT_VERSION_JAVA_FILE_PATH = "server/src/main/java/org/elasticsearch/Version.java";
|
||||
private static Boolean _isBundledJdkSupported = null;
|
||||
|
||||
private ObjectFactory objectFactory;
|
||||
private final JavaInstallationRegistry javaInstallationRegistry;
|
||||
private final JvmMetadataDetector metadataDetector;
|
||||
private final ProviderFactory providers;
|
||||
private JavaToolchainService toolChainService;
|
||||
|
||||
@Inject
|
||||
public GlobalBuildInfoPlugin(
|
||||
ObjectFactory objectFactory,
|
||||
JavaInstallationRegistry javaInstallationRegistry,
|
||||
JvmMetadataDetector metadataDetector,
|
||||
ProviderFactory providers
|
||||
) {
|
||||
this.objectFactory = objectFactory;
|
||||
this.javaInstallationRegistry = javaInstallationRegistry;
|
||||
this.metadataDetector = new ErrorTraceMetadataDetector(metadataDetector);
|
||||
this.providers = providers;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,6 +87,8 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
if (project != project.getRootProject()) {
|
||||
throw new IllegalStateException(this.getClass().getName() + " can only be applied to the root project.");
|
||||
}
|
||||
project.getPlugins().apply(JvmToolchainsPlugin.class);
|
||||
toolChainService = project.getExtensions().getByType(JavaToolchainService.class);
|
||||
GradleVersion minimumGradleVersion = GradleVersion.version(getResourceContents("/minimumGradleVersion"));
|
||||
if (GradleVersion.current().compareTo(minimumGradleVersion) < 0) {
|
||||
throw new GradleException("Gradle " + minimumGradleVersion.getVersion() + "+ is required");
|
||||
|
@ -80,16 +98,23 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
JavaVersion minimumRuntimeVersion = JavaVersion.toVersion(getResourceContents("/minimumRuntimeVersion"));
|
||||
|
||||
File runtimeJavaHome = findRuntimeJavaHome();
|
||||
boolean isRuntimeJavaHomeSet = Jvm.current().getJavaHome().equals(runtimeJavaHome) == false;
|
||||
|
||||
File rootDir = project.getRootDir();
|
||||
GitInfo gitInfo = GitInfo.gitInfo(rootDir);
|
||||
GitInfo gitInfo = GitInfo.gitInfo(project.getRootDir());
|
||||
|
||||
BuildParams.init(params -> {
|
||||
params.reset();
|
||||
params.setRuntimeJavaHome(runtimeJavaHome);
|
||||
params.setRuntimeJavaVersion(determineJavaVersion("runtime java.home", runtimeJavaHome, minimumRuntimeVersion));
|
||||
params.setIsRuntimeJavaHomeSet(Jvm.current().getJavaHome().equals(runtimeJavaHome) == false);
|
||||
JvmInstallationMetadata runtimeJdkMetaData = metadataDetector.getMetadata(getJavaInstallation(runtimeJavaHome).getLocation());
|
||||
params.setJavaToolChainSpec(resolveToolchainSpecFromEnv());
|
||||
params.setRuntimeJavaVersion(
|
||||
determineJavaVersion(
|
||||
"runtime java.home",
|
||||
runtimeJavaHome,
|
||||
isRuntimeJavaHomeSet ? minimumRuntimeVersion : Jvm.current().getJavaVersion()
|
||||
)
|
||||
);
|
||||
params.setIsRuntimeJavaHomeSet(isRuntimeJavaHomeSet);
|
||||
JvmInstallationMetadata runtimeJdkMetaData = metadataDetector.getMetadata(getJavaInstallation(runtimeJavaHome));
|
||||
params.setRuntimeJavaDetails(formatJavaVendorDetails(runtimeJdkMetaData));
|
||||
params.setJavaVersions(getAvailableJavaVersions());
|
||||
params.setMinimumCompilerVersion(minimumCompilerVersion);
|
||||
|
@ -99,19 +124,42 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
params.setGitOrigin(gitInfo.getOrigin());
|
||||
params.setBuildDate(ZonedDateTime.now(ZoneOffset.UTC));
|
||||
params.setTestSeed(getTestSeed());
|
||||
params.setIsCi(System.getenv("JENKINS_URL") != null);
|
||||
params.setIsCi(System.getenv("JENKINS_URL") != null || System.getenv("BUILDKITE_BUILD_URL") != null);
|
||||
params.setDefaultParallel(ParallelDetector.findDefaultParallel(project));
|
||||
params.setInFipsJvm(Util.getBooleanProperty("tests.fips.enabled", false));
|
||||
params.setIsSnapshotBuild(Util.getBooleanProperty("build.snapshot", true));
|
||||
params.setBwcVersions(providers.provider(() -> resolveBwcVersions(rootDir)));
|
||||
AtomicReference<BwcVersions> cache = new AtomicReference<>();
|
||||
params.setBwcVersions(
|
||||
providers.provider(
|
||||
() -> cache.updateAndGet(
|
||||
val -> val == null ? resolveBwcVersions(Util.locateElasticsearchWorkspace(project.getGradle())) : val
|
||||
)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
// Enforce the minimum compiler version
|
||||
assertMinimumCompilerVersion(minimumCompilerVersion);
|
||||
|
||||
// Print global build info header just before task execution
|
||||
// Only do this if we are the root build of a composite
|
||||
if (GradleUtils.isIncludedBuild(project) == false) {
|
||||
project.getGradle().getTaskGraph().whenReady(graph -> logGlobalBuildInfo());
|
||||
}
|
||||
}
|
||||
|
||||
private Provider<MetadataBasedToolChainMatcher> resolveToolchainSpecFromEnv() {
|
||||
return providers.environmentVariable("JAVA_TOOLCHAIN_HOME").map(toolChainEnvVariable -> {
|
||||
File toolChainDir = new File(toolChainEnvVariable);
|
||||
JvmInstallationMetadata metadata = metadataDetector.getMetadata(getJavaInstallation(toolChainDir));
|
||||
if (metadata.isValidInstallation() == false) {
|
||||
throw new GradleException(
|
||||
"Configured JAVA_TOOLCHAIN_HOME " + toolChainEnvVariable + " does not point to a valid jdk installation."
|
||||
);
|
||||
}
|
||||
return new MetadataBasedToolChainMatcher(metadata);
|
||||
});
|
||||
}
|
||||
|
||||
private String formatJavaVendorDetails(JvmInstallationMetadata runtimeJdkMetaData) {
|
||||
JvmVendor vendor = runtimeJdkMetaData.getVendor();
|
||||
|
@ -136,18 +184,20 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
final String osVersion = System.getProperty("os.version");
|
||||
final String osArch = System.getProperty("os.arch");
|
||||
final Jvm gradleJvm = Jvm.current();
|
||||
JvmInstallationMetadata gradleJvmMetadata = metadataDetector.getMetadata(gradleJvm.getJavaHome());
|
||||
JvmInstallationMetadata gradleJvmMetadata = metadataDetector.getMetadata(getJavaInstallation(gradleJvm.getJavaHome()));
|
||||
final String gradleJvmVendorDetails = gradleJvmMetadata.getVendor().getDisplayName();
|
||||
final String gradleJvmImplementationVersion = gradleJvmMetadata.getImplementationVersion();
|
||||
final String gradleJvmImplementationVersion = gradleJvmMetadata.getJvmVersion();
|
||||
LOGGER.quiet("=======================================");
|
||||
LOGGER.quiet("Elasticsearch Build Hamster says Hello!");
|
||||
LOGGER.quiet(" Gradle Version : " + GradleVersion.current().getVersion());
|
||||
LOGGER.quiet(" OS Info : " + osName + " " + osVersion + " (" + osArch + ")");
|
||||
if (BuildParams.getIsRuntimeJavaHomeSet()) {
|
||||
JvmInstallationMetadata runtimeJvm = metadataDetector.getMetadata(BuildParams.getRuntimeJavaHome());
|
||||
JvmInstallationMetadata runtimeJvm = metadataDetector.getMetadata(getJavaInstallation(BuildParams.getRuntimeJavaHome()));
|
||||
final String runtimeJvmVendorDetails = runtimeJvm.getVendor().getDisplayName();
|
||||
final String runtimeJvmImplementationVersion = runtimeJvm.getImplementationVersion();
|
||||
LOGGER.quiet(" Runtime JDK Version : " + runtimeJvmImplementationVersion + " (" + runtimeJvmVendorDetails + ")");
|
||||
final String runtimeJvmImplementationVersion = runtimeJvm.getJvmVersion();
|
||||
final String runtimeVersion = runtimeJvm.getRuntimeVersion();
|
||||
final String runtimeExtraDetails = runtimeJvmVendorDetails + ", " + runtimeVersion;
|
||||
LOGGER.quiet(" Runtime JDK Version : " + runtimeJvmImplementationVersion + " (" + runtimeExtraDetails + ")");
|
||||
LOGGER.quiet(" Runtime java.home : " + BuildParams.getRuntimeJavaHome());
|
||||
LOGGER.quiet(" Gradle JDK Version : " + gradleJvmImplementationVersion + " (" + gradleJvmVendorDetails + ")");
|
||||
LOGGER.quiet(" Gradle java.home : " + gradleJvm.getJavaHome());
|
||||
|
@ -155,6 +205,10 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
LOGGER.quiet(" JDK Version : " + gradleJvmImplementationVersion + " (" + gradleJvmVendorDetails + ")");
|
||||
LOGGER.quiet(" JAVA_HOME : " + gradleJvm.getJavaHome());
|
||||
}
|
||||
String javaToolchainHome = System.getenv("JAVA_TOOLCHAIN_HOME");
|
||||
if (javaToolchainHome != null) {
|
||||
LOGGER.quiet(" JAVA_TOOLCHAIN_HOME : " + javaToolchainHome);
|
||||
}
|
||||
LOGGER.quiet(" Random Testing Seed : " + BuildParams.getTestSeed());
|
||||
LOGGER.quiet(" In FIPS 140 mode : " + BuildParams.isInFipsJvm());
|
||||
LOGGER.quiet("=======================================");
|
||||
|
@ -162,7 +216,7 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
|
||||
private JavaVersion determineJavaVersion(String description, File javaHome, JavaVersion requiredVersion) {
|
||||
InstallationLocation installation = getJavaInstallation(javaHome);
|
||||
JavaVersion actualVersion = metadataDetector.getMetadata(installation.getLocation()).getLanguageVersion();
|
||||
JavaVersion actualVersion = metadataDetector.getMetadata(installation).getLanguageVersion();
|
||||
if (actualVersion.isCompatibleWith(requiredVersion) == false) {
|
||||
throwInvalidJavaHomeException(
|
||||
description,
|
||||
|
@ -183,7 +237,7 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
|
||||
private boolean isSameFile(File javaHome, InstallationLocation installationLocation) {
|
||||
try {
|
||||
return Files.isSameFile(installationLocation.getLocation().toPath(), javaHome.toPath());
|
||||
return Files.isSameFile(javaHome.toPath(), installationLocation.getLocation().toPath());
|
||||
} catch (IOException ioException) {
|
||||
throw new UncheckedIOException(ioException);
|
||||
}
|
||||
|
@ -195,16 +249,15 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
*/
|
||||
private List<JavaHome> getAvailableJavaVersions() {
|
||||
return getAvailableJavaInstallationLocationSteam().map(installationLocation -> {
|
||||
File installationDir = installationLocation.getLocation();
|
||||
JvmInstallationMetadata metadata = metadataDetector.getMetadata(installationDir);
|
||||
JvmInstallationMetadata metadata = metadataDetector.getMetadata(installationLocation);
|
||||
int actualVersion = Integer.parseInt(metadata.getLanguageVersion().getMajorVersion());
|
||||
return JavaHome.of(actualVersion, providers.provider(() -> installationDir));
|
||||
return JavaHome.of(actualVersion, providers.provider(() -> installationLocation.getLocation()));
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private Stream<InstallationLocation> getAvailableJavaInstallationLocationSteam() {
|
||||
return Stream.concat(
|
||||
javaInstallationRegistry.listInstallations().stream(),
|
||||
javaInstallationRegistry.toolchains().stream().map(metadata -> metadata.location),
|
||||
Stream.of(new InstallationLocation(Jvm.current().getJavaHome(), "Current JVM"))
|
||||
);
|
||||
}
|
||||
|
@ -249,14 +302,24 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
if (runtimeJavaProperty != null) {
|
||||
return new File(findJavaHome(runtimeJavaProperty));
|
||||
}
|
||||
|
||||
return System.getenv("RUNTIME_JAVA_HOME") == null ? Jvm.current().getJavaHome() : new File(System.getenv("RUNTIME_JAVA_HOME"));
|
||||
String env = System.getenv("RUNTIME_JAVA_HOME");
|
||||
if (env != null) {
|
||||
return new File(env);
|
||||
}
|
||||
// fall back to tool chain if set.
|
||||
env = System.getenv("JAVA_TOOLCHAIN_HOME");
|
||||
return env == null ? Jvm.current().getJavaHome() : new File(env);
|
||||
}
|
||||
|
||||
private String findJavaHome(String version) {
|
||||
Provider<String> javaHomeNames = providers.gradleProperty("org.gradle.java.installations.fromEnv");
|
||||
String javaHomeEnvVar = getJavaHomeEnvVarName(version);
|
||||
String env = System.getenv(javaHomeEnvVar);
|
||||
return env != null ? resolveJavaHomeFromEnvVariable(javaHomeEnvVar) : resolveJavaHomeFromToolChainService(version);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String resolveJavaHomeFromEnvVariable(String javaHomeEnvVar) {
|
||||
Provider<String> javaHomeNames = providers.gradleProperty("org.gradle.java.installations.fromEnv");
|
||||
// Provide a useful error if we're looking for a Java home version that we haven't told Gradle about yet
|
||||
Arrays.stream(javaHomeNames.get().split(","))
|
||||
.filter(s -> s.equals(javaHomeEnvVar))
|
||||
|
@ -269,7 +332,6 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
+ "updated in gradle.properties file."
|
||||
)
|
||||
);
|
||||
|
||||
String versionedJavaHome = System.getenv(javaHomeEnvVar);
|
||||
if (versionedJavaHome == null) {
|
||||
final String exceptionMessage = String.format(
|
||||
|
@ -280,12 +342,25 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
+ "it to be picked up. See https://github.com/elastic/elasticsearch/issues/31399 details.",
|
||||
javaHomeEnvVar
|
||||
);
|
||||
|
||||
throw new GradleException(exceptionMessage);
|
||||
}
|
||||
return versionedJavaHome;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String resolveJavaHomeFromToolChainService(String version) {
|
||||
Property<JavaLanguageVersion> value = objectFactory.property(JavaLanguageVersion.class).value(JavaLanguageVersion.of(version));
|
||||
Provider<JavaLauncher> javaLauncherProvider = toolChainService.launcherFor(
|
||||
javaToolchainSpec -> javaToolchainSpec.getLanguageVersion().value(value)
|
||||
);
|
||||
|
||||
try {
|
||||
return javaLauncherProvider.get().getMetadata().getInstallationPath().getAsFile().getCanonicalPath();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getJavaHomeEnvVarName(String version) {
|
||||
return "JAVA" + version + "_HOME";
|
||||
}
|
||||
|
@ -316,8 +391,8 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public JvmInstallationMetadata getMetadata(File file) {
|
||||
JvmInstallationMetadata metadata = delegate.getMetadata(file);
|
||||
public JvmInstallationMetadata getMetadata(InstallationLocation installationLocation) {
|
||||
JvmInstallationMetadata metadata = delegate.getMetadata(installationLocation);
|
||||
if (metadata instanceof JvmInstallationMetadata.FailureInstallationMetadata) {
|
||||
throw new GradleException("Jvm Metadata cannot be resolved for " + metadata.getJavaHome().toString());
|
||||
}
|
||||
|
@ -325,4 +400,19 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
}
|
||||
}
|
||||
|
||||
private static class MetadataBasedToolChainMatcher implements Action<JavaToolchainSpec> {
|
||||
private final JvmVendorSpec expectedVendorSpec;
|
||||
private final JavaLanguageVersion expectedJavaLanguageVersion;
|
||||
|
||||
MetadataBasedToolChainMatcher(JvmInstallationMetadata metadata) {
|
||||
expectedVendorSpec = JvmVendorSpec.matching(metadata.getVendor().getRawVendor());
|
||||
expectedJavaLanguageVersion = JavaLanguageVersion.of(metadata.getLanguageVersion().getMajorVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(JavaToolchainSpec spec) {
|
||||
spec.getVendor().set(expectedVendorSpec);
|
||||
spec.getLanguageVersion().set(expectedJavaLanguageVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,9 +37,11 @@ import org.gradle.api.artifacts.Configuration;
|
|||
import org.gradle.api.artifacts.dsl.DependencyHandler;
|
||||
import org.gradle.api.artifacts.type.ArtifactTypeDefinition;
|
||||
import org.gradle.api.plugins.JavaBasePlugin;
|
||||
import org.gradle.api.plugins.JavaPluginExtension;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.specs.Specs;
|
||||
import org.gradle.api.tasks.Copy;
|
||||
import org.gradle.api.tasks.SourceSet;
|
||||
import org.gradle.api.tasks.TaskProvider;
|
||||
import org.gradle.api.tasks.testing.Test;
|
||||
import org.gradle.initialization.layout.BuildLayout;
|
||||
|
@ -368,6 +370,9 @@ public class DistroTestPlugin implements Plugin<Project> {
|
|||
t.onlyIf(t3 -> distribution.getArchitecture() == Architecture.current());
|
||||
t.getOutputs().doNotCacheIf("Build cache is disabled for packaging tests", Specs.satisfyAll());
|
||||
t.setMaxParallelForks(1);
|
||||
SourceSet testSourceSet = project.getExtensions().getByType(JavaPluginExtension.class).getSourceSets().getByName("test");
|
||||
t.setClasspath(testSourceSet.getRuntimeClasspath());
|
||||
t.setTestClassesDirs(testSourceSet.getOutput().getClassesDirs());
|
||||
t.setWorkingDir(project.getProjectDir());
|
||||
if (System.getProperty(IN_VM_SYSPROP) == null) {
|
||||
t.dependsOn(deps);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class StandaloneRestTestPlugin implements Plugin<Project> {
|
|||
);
|
||||
|
||||
IdeaModel idea = project.getExtensions().getByType(IdeaModel.class);
|
||||
idea.getModule().getTestSourceDirs().addAll(testSourceSet.getJava().getSrcDirs());
|
||||
idea.getModule().getTestSources().from(testSourceSet.getJava().getSrcDirs());
|
||||
idea.getModule()
|
||||
.getScopes()
|
||||
.put(
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.gradle.api.internal.tasks.testing.TestCompleteEvent;
|
|||
import org.gradle.api.internal.tasks.testing.TestDescriptorInternal;
|
||||
import org.gradle.api.internal.tasks.testing.TestResultProcessor;
|
||||
import org.gradle.api.internal.tasks.testing.TestStartEvent;
|
||||
import org.gradle.api.tasks.testing.TestFailure;
|
||||
import org.gradle.api.tasks.testing.TestOutputEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -30,7 +31,7 @@ final class RerunTestResultProcessor implements TestResultProcessor {
|
|||
* being the root element. This is required to be tracked here to get the
|
||||
* structure right when rerunning a test task tests.
|
||||
* */
|
||||
private Object rootTestDescriptorId;
|
||||
private TestDescriptorInternal rootTestDescriptor;
|
||||
|
||||
RerunTestResultProcessor(TestResultProcessor delegate) {
|
||||
this.delegate = delegate;
|
||||
|
@ -39,13 +40,21 @@ final class RerunTestResultProcessor implements TestResultProcessor {
|
|||
@Override
|
||||
public void started(TestDescriptorInternal descriptor, TestStartEvent testStartEvent) {
|
||||
activeDescriptorsById.put(descriptor.getId(), descriptor);
|
||||
if (rootTestDescriptorId == null) {
|
||||
rootTestDescriptorId = descriptor.getId();
|
||||
if (rootTestDescriptor == null) {
|
||||
rootTestDescriptor = descriptor;
|
||||
try {
|
||||
delegate.started(descriptor, testStartEvent);
|
||||
} else if (descriptor.getId().equals(rootTestDescriptorId) == false) {
|
||||
} catch (IllegalArgumentException illegalArgumentException) {
|
||||
logTracing(descriptor.getId(), illegalArgumentException);
|
||||
}
|
||||
} else if (descriptor.getId().equals(rootTestDescriptor.getId()) == false) {
|
||||
boolean active = activeDescriptorsById.containsKey(testStartEvent.getParentId());
|
||||
if (active) {
|
||||
try {
|
||||
delegate.started(descriptor, testStartEvent);
|
||||
} catch (IllegalArgumentException illegalArgumentException) {
|
||||
logTracing(descriptor.getId(), illegalArgumentException);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +62,7 @@ final class RerunTestResultProcessor implements TestResultProcessor {
|
|||
@Override
|
||||
public void completed(Object testId, TestCompleteEvent testCompleteEvent) {
|
||||
boolean active = activeDescriptorsById.containsKey(testId);
|
||||
if (testId.equals(rootTestDescriptorId)) {
|
||||
if (testId.equals(rootTestDescriptor.getId())) {
|
||||
if (activeDescriptorsById.size() != 1) {
|
||||
return;
|
||||
}
|
||||
|
@ -61,27 +70,50 @@ final class RerunTestResultProcessor implements TestResultProcessor {
|
|||
activeDescriptorsById.remove(testId);
|
||||
}
|
||||
if (active) {
|
||||
try {
|
||||
delegate.completed(testId, testCompleteEvent);
|
||||
} catch (IllegalArgumentException illegalArgumentException) {
|
||||
logTracing(testId, illegalArgumentException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void output(Object testId, TestOutputEvent testOutputEvent) {
|
||||
if (activeDescriptorsById.containsKey(testId)) {
|
||||
try {
|
||||
delegate.output(testId, testOutputEvent);
|
||||
} catch (IllegalArgumentException illegalArgumentException) {
|
||||
logTracing(testId, illegalArgumentException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void failure(Object testId, Throwable throwable) {
|
||||
public void failure(Object testId, TestFailure result) {
|
||||
if (activeDescriptorsById.containsKey(testId)) {
|
||||
activeDescriptorsById.remove(testId);
|
||||
delegate.failure(testId, throwable);
|
||||
try {
|
||||
delegate.failure(testId, result);
|
||||
} catch (IllegalArgumentException illegalArgumentException) {
|
||||
logTracing(testId, illegalArgumentException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void logTracing(Object testId, IllegalArgumentException illegalArgumentException) {
|
||||
// Add tracing to diagnose why we see this on CI
|
||||
System.out.println("Rerun failure test id = " + testId);
|
||||
System.out.println("Active test descriptors:");
|
||||
for (Map.Entry<Object, TestDescriptorInternal> entry : activeDescriptorsById.entrySet()) {
|
||||
System.out.println("id= " + entry.getKey() + " -- " + entry.getValue().getDisplayName());
|
||||
}
|
||||
illegalArgumentException.printStackTrace();
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
this.activeDescriptorsById.clear();
|
||||
this.activeDescriptorsById.put(rootTestDescriptor.getId(), rootTestDescriptor);
|
||||
}
|
||||
|
||||
public List<TestDescriptorInternal> getActiveDescriptors() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.5.1
|
||||
8.2
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.gradle.api.internal.tasks.testing.TestCompleteEvent
|
|||
import org.gradle.api.internal.tasks.testing.TestDescriptorInternal
|
||||
import org.gradle.api.internal.tasks.testing.TestResultProcessor
|
||||
import org.gradle.api.internal.tasks.testing.TestStartEvent
|
||||
import org.gradle.api.tasks.testing.TestFailure
|
||||
import org.gradle.api.tasks.testing.TestOutputEvent
|
||||
import spock.lang.Specification
|
||||
|
||||
|
@ -75,20 +76,20 @@ class RerunTestResultProcessorTestSpec extends Specification {
|
|||
|
||||
def testDescriptor2 = descriptor("testId2")
|
||||
def testStartEvent2 = startEvent("testId2")
|
||||
def testError2 = Mock(Throwable)
|
||||
def testFailure = Mock(TestFailure)
|
||||
|
||||
when:
|
||||
processor.started(rootDescriptor, rootTestStartEvent)
|
||||
processor.started(testDescriptor1, testStartEvent1)
|
||||
processor.started(testDescriptor2, testStartEvent2)
|
||||
processor.failure("testId2", testError2)
|
||||
processor.failure("testId2", testFailure)
|
||||
processor.completed("rootId", rootCompleteEvent)
|
||||
|
||||
then:
|
||||
1 * delegate.started(rootDescriptor, rootTestStartEvent)
|
||||
1 * delegate.started(testDescriptor1, testStartEvent1)
|
||||
1 * delegate.started(testDescriptor2, testStartEvent2)
|
||||
1 * delegate.failure("testId2", testError2)
|
||||
1 * delegate.failure("testId2", testFailure)
|
||||
0 * delegate.completed("rootId", rootCompleteEvent)
|
||||
|
||||
when:
|
||||
|
@ -132,10 +133,4 @@ class RerunTestResultProcessorTestSpec extends Specification {
|
|||
_ * event.getParentId() >> parentId
|
||||
event
|
||||
}
|
||||
|
||||
// TestFinishEvent finishEvent(String parentId) {
|
||||
// def event = Mock(TestFinishEvent)
|
||||
// _ * event.getParentId() >> parentId
|
||||
// event
|
||||
// }
|
||||
}
|
|
@ -21,8 +21,11 @@ description = "The elasticsearch build tools"
|
|||
|
||||
group = "org.elasticsearch.gradle"
|
||||
version = versions.getProperty("elasticsearch")
|
||||
|
||||
java {
|
||||
targetCompatibility = 11
|
||||
sourceCompatibility = 11
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
// We already configure publication and we don't need or want the one that comes
|
||||
|
@ -68,7 +71,7 @@ gradlePlugin {
|
|||
// we write this back out below to load it in the Build.java which will be shown in rest main action
|
||||
// to indicate this being a snapshot build or a release build.
|
||||
def generateVersionProperties = tasks.register("generateVersionProperties", WriteProperties) {
|
||||
outputFile = "${buildDir}/version.properties"
|
||||
destinationFile = new File(buildDir, "version.properties");
|
||||
comment = 'Generated version properties'
|
||||
properties(versions)
|
||||
}
|
||||
|
|
|
@ -7,8 +7,12 @@ plugins {
|
|||
|
||||
group = "org.elasticsearch.gradle"
|
||||
version = versions.getProperty("elasticsearch")
|
||||
|
||||
|
||||
java {
|
||||
targetCompatibility = 11
|
||||
sourceCompatibility = 11
|
||||
}
|
||||
|
||||
tasks.named("jar").configure {
|
||||
archiveFileName = "${project.name}.jar"
|
||||
|
|
|
@ -11,6 +11,7 @@ package org.elasticsearch.gradle.test
|
|||
import org.elasticsearch.gradle.VersionProperties
|
||||
import org.elasticsearch.gradle.fixtures.AbstractGradleFuncTest
|
||||
import org.gradle.testkit.runner.TaskOutcome
|
||||
import spock.lang.Ignore
|
||||
|
||||
class JavaRestTestPluginFuncTest extends AbstractGradleFuncTest {
|
||||
|
||||
|
@ -19,6 +20,7 @@ class JavaRestTestPluginFuncTest extends AbstractGradleFuncTest {
|
|||
configurationCacheCompatible = false
|
||||
}
|
||||
|
||||
@Ignore('https://github.com/gradle/gradle/issues/21868')
|
||||
def "declares default dependencies"() {
|
||||
given:
|
||||
buildFile << """
|
||||
|
|
|
@ -11,6 +11,7 @@ package org.elasticsearch.gradle.test
|
|||
import org.elasticsearch.gradle.VersionProperties
|
||||
import org.elasticsearch.gradle.fixtures.AbstractGradleFuncTest
|
||||
import org.gradle.testkit.runner.TaskOutcome
|
||||
import spock.lang.Ignore
|
||||
|
||||
class YamlRestTestPluginFuncTest extends AbstractGradleFuncTest {
|
||||
|
||||
|
@ -19,6 +20,7 @@ class YamlRestTestPluginFuncTest extends AbstractGradleFuncTest {
|
|||
configurationCacheCompatible = false
|
||||
}
|
||||
|
||||
@Ignore('https://github.com/gradle/gradle/issues/21868')
|
||||
def "declares default dependencies"() {
|
||||
given:
|
||||
buildFile << """
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.gradle.api.provider.Property;
|
|||
import org.gradle.api.tasks.TaskDependency;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -152,11 +153,20 @@ public class Jdk implements Buildable, Iterable<File> {
|
|||
return new Object() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return getHomeRoot() + "/bin/java";
|
||||
try {
|
||||
return new File(getHomeRoot() + getPlatformBinPath()).getCanonicalPath();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private String getPlatformBinPath() {
|
||||
boolean isWindows = "windows".equals(getPlatform());
|
||||
return "/bin/java" + (isWindows ? ".exe" : "");
|
||||
}
|
||||
|
||||
public Object getJavaHomePath() {
|
||||
return new Object() {
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.gradle.api.artifacts.dsl.DependencyHandler;
|
|||
import org.gradle.api.artifacts.type.ArtifactTypeDefinition;
|
||||
import org.gradle.api.file.RegularFile;
|
||||
import org.gradle.api.plugins.BasePlugin;
|
||||
import org.gradle.api.plugins.BasePluginConvention;
|
||||
import org.gradle.api.plugins.BasePluginExtension;
|
||||
import org.gradle.api.plugins.JavaPlugin;
|
||||
import org.gradle.api.plugins.JavaPluginExtension;
|
||||
import org.gradle.api.provider.Provider;
|
||||
|
@ -78,37 +78,43 @@ public class PluginBuildPlugin implements Plugin<Project> {
|
|||
|
||||
final TaskProvider<Zip> bundleTask = createBundleTasks(project, extension);
|
||||
project.afterEvaluate(project1 -> {
|
||||
final PluginPropertiesExtension extension1 = project1.getExtensions().getByType(PluginPropertiesExtension.class);
|
||||
configurePublishing(project1, extension1);
|
||||
String name = extension1.getName();
|
||||
project1.setProperty("archivesBaseName", name);
|
||||
project1.setDescription(extension1.getDescription());
|
||||
final PluginPropertiesExtension pluginPropertiesExtension = project1.getExtensions().getByType(PluginPropertiesExtension.class);
|
||||
configurePublishing(project1, pluginPropertiesExtension);
|
||||
String name = pluginPropertiesExtension.getName();
|
||||
|
||||
if (extension1.getName() == null) {
|
||||
final BasePluginExtension basepluginExtension = project1.getExtensions().getByType(BasePluginExtension.class);
|
||||
basepluginExtension.getArchivesName().set(name);
|
||||
project1.setDescription(pluginPropertiesExtension.getDescription());
|
||||
|
||||
if (pluginPropertiesExtension.getName() == null) {
|
||||
throw new InvalidUserDataException("name is a required setting for esplugin");
|
||||
}
|
||||
|
||||
if (extension1.getDescription() == null) {
|
||||
if (pluginPropertiesExtension.getDescription() == null) {
|
||||
throw new InvalidUserDataException("description is a required setting for esplugin");
|
||||
}
|
||||
|
||||
if (extension1.getType().equals(PluginType.BOOTSTRAP) == false && extension1.getClassname() == null) {
|
||||
if (pluginPropertiesExtension.getType().equals(PluginType.BOOTSTRAP) == false
|
||||
&& pluginPropertiesExtension.getClassname() == null) {
|
||||
throw new InvalidUserDataException("classname is a required setting for esplugin");
|
||||
}
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>(12);
|
||||
map.put("name", extension1.getName());
|
||||
map.put("description", extension1.getDescription());
|
||||
map.put("version", extension1.getVersion());
|
||||
map.put("name", pluginPropertiesExtension.getName());
|
||||
map.put("description", pluginPropertiesExtension.getDescription());
|
||||
map.put("version", pluginPropertiesExtension.getVersion());
|
||||
map.put("elasticsearchVersion", Version.fromString(VersionProperties.getElasticsearch()).toString());
|
||||
map.put("javaVersion", project1.getExtensions().getByType(JavaPluginExtension.class).getTargetCompatibility().toString());
|
||||
map.put("classname", extension1.getType().equals(PluginType.BOOTSTRAP) ? "" : extension1.getClassname());
|
||||
map.put("extendedPlugins", extension1.getExtendedPlugins().stream().collect(Collectors.joining(",")));
|
||||
map.put("hasNativeController", extension1.isHasNativeController());
|
||||
map.put("requiresKeystore", extension1.isRequiresKeystore());
|
||||
map.put("type", extension1.getType().toString());
|
||||
map.put("javaOpts", extension1.getJavaOpts());
|
||||
map.put("licensed", extension1.isLicensed());
|
||||
map.put(
|
||||
"classname",
|
||||
pluginPropertiesExtension.getType().equals(PluginType.BOOTSTRAP) ? "" : pluginPropertiesExtension.getClassname()
|
||||
);
|
||||
map.put("extendedPlugins", pluginPropertiesExtension.getExtendedPlugins().stream().collect(Collectors.joining(",")));
|
||||
map.put("hasNativeController", pluginPropertiesExtension.isHasNativeController());
|
||||
map.put("requiresKeystore", pluginPropertiesExtension.isRequiresKeystore());
|
||||
map.put("type", pluginPropertiesExtension.getType().toString());
|
||||
map.put("javaOpts", pluginPropertiesExtension.getJavaOpts());
|
||||
map.put("licensed", pluginPropertiesExtension.isLicensed());
|
||||
project1.getTasks().withType(Copy.class).named("pluginProperties").configure(copy -> {
|
||||
copy.expand(map);
|
||||
copy.getInputs().properties(map);
|
||||
|
@ -146,9 +152,10 @@ public class PluginBuildPlugin implements Plugin<Project> {
|
|||
.withType(Jar.class)
|
||||
.configureEach(jar -> jar.getArchiveBaseName().set(jar.getArchiveBaseName().get() + "-client"));
|
||||
project.getTasks().withType(GenerateMavenPom.class).configureEach(pomTask -> {
|
||||
String archivesBaseName = project.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName();
|
||||
final BasePluginExtension basepluginExtension = project.getExtensions().getByType(BasePluginExtension.class);
|
||||
String archivesName = basepluginExtension.getArchivesName().get();
|
||||
pomTask.setDestination(
|
||||
new File(project.getBuildDir(), "/distributions/" + archivesBaseName + "-client-" + project.getVersion() + ".pom")
|
||||
new File(project.getBuildDir(), "/distributions/" + archivesName + "-client-" + project.getVersion() + ".pom")
|
||||
);
|
||||
});
|
||||
elastic.setArtifactId(extension.getName() + "-client");
|
||||
|
|
|
@ -10,6 +10,7 @@ package org.elasticsearch.gradle.plugin;
|
|||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.file.RegularFileProperty;
|
||||
import org.gradle.api.plugins.BasePluginExtension;
|
||||
import org.gradle.api.plugins.ExtraPropertiesExtension;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -66,6 +67,7 @@ public class PluginPropertiesExtension {
|
|||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.project.getExtensions().getByType(BasePluginExtension.class).getArchivesName().set(name);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
package org.elasticsearch.gradle.testclusters;
|
||||
|
||||
import org.elasticsearch.gradle.FileSystemOperationsAware;
|
||||
import org.elasticsearch.gradle.util.GradleUtils;
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.services.internal.BuildServiceProvider;
|
||||
import org.gradle.api.services.internal.BuildServiceRegistryInternal;
|
||||
import org.gradle.api.tasks.CacheableTask;
|
||||
import org.gradle.api.tasks.Internal;
|
||||
|
@ -81,9 +80,8 @@ public class StandaloneRestIntegTestTask extends Test implements TestClustersAwa
|
|||
public List<ResourceLock> getSharedResources() {
|
||||
List<ResourceLock> locks = new ArrayList<>(super.getSharedResources());
|
||||
BuildServiceRegistryInternal serviceRegistry = getServices().get(BuildServiceRegistryInternal.class);
|
||||
Provider<TestClustersThrottle> throttleProvider = GradleUtils.getBuildService(serviceRegistry, THROTTLE_SERVICE_NAME);
|
||||
SharedResource resource = serviceRegistry.forService(throttleProvider);
|
||||
|
||||
BuildServiceProvider<?, ?> serviceProvider = serviceRegistry.consume(THROTTLE_SERVICE_NAME, TestClustersThrottle.class);
|
||||
SharedResource resource = serviceRegistry.forService(serviceProvider);
|
||||
int nodeCount = clusters.stream().mapToInt(cluster -> cluster.getNodes().size()).sum();
|
||||
if (nodeCount > 0) {
|
||||
for (int i = 0; i < Math.min(nodeCount, resource.getMaxUsages()); i++) {
|
||||
|
|
|
@ -127,7 +127,7 @@ public abstract class GradleUtils {
|
|||
Configuration runtimeClasspathConfiguration = project.getConfigurations().getByName(runtimeClasspathName);
|
||||
project.getPluginManager().withPlugin("idea", p -> {
|
||||
IdeaModel idea = project.getExtensions().getByType(IdeaModel.class);
|
||||
idea.getModule().setTestSourceDirs(testSourceSet.getJava().getSrcDirs());
|
||||
idea.getModule().getTestSources().from(testSourceSet.getJava().getSrcDirs());
|
||||
idea.getModule().getScopes().put(testSourceSet.getName(), Map.of("plus", List.of(runtimeClasspathConfiguration)));
|
||||
});
|
||||
project.getPluginManager().withPlugin("eclipse", p -> {
|
||||
|
@ -219,4 +219,16 @@ public abstract class GradleUtils {
|
|||
public static String projectPath(String taskPath) {
|
||||
return taskPath.lastIndexOf(':') == 0 ? ":" : taskPath.substring(0, taskPath.lastIndexOf(':'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the given {@link Project} is part of a composite included build. Returns {@code false} for any projects that belong
|
||||
* to the root "outer" build of a composite.
|
||||
*
|
||||
* @param project the current project
|
||||
* @return true if the project is an included build
|
||||
*/
|
||||
public static boolean isIncludedBuild(Project project) {
|
||||
return project.getGradle().getParent() != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ package org.elasticsearch.gradle;
|
|||
import org.gradle.api.NamedDomainObjectContainer;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
|
@ -19,12 +18,6 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.junit.Assert.assertThrows;
|
||||
|
||||
public class JdkDownloadPluginTests {
|
||||
private static Project rootProject;
|
||||
|
||||
@BeforeClass
|
||||
public static void setupRoot() {
|
||||
rootProject = ProjectBuilder.builder().build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissingVendor() {
|
||||
|
@ -134,7 +127,7 @@ public class JdkDownloadPluginTests {
|
|||
}
|
||||
|
||||
private Project createProject() {
|
||||
Project project = ProjectBuilder.builder().withParent(rootProject).build();
|
||||
Project project = ProjectBuilder.builder().withParent(ProjectBuilder.builder().build()).build();
|
||||
project.getPlugins().apply("elasticsearch.jdk-download");
|
||||
return project;
|
||||
}
|
||||
|
|
|
@ -149,4 +149,9 @@ public class InternalAwareGradleRunner extends GradleRunner {
|
|||
public BuildResult buildAndFail() throws InvalidRunnerConfigurationException, UnexpectedBuildSuccess {
|
||||
return delegate.buildAndFail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuildResult run() throws InvalidRunnerConfigurationException {
|
||||
return delegate.run();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,6 +152,11 @@ public class NormalizeOutputGradleRunner extends GradleRunner {
|
|||
return new NormalizedBuildResult(delegate.buildAndFail());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuildResult run() throws InvalidRunnerConfigurationException {
|
||||
return new NormalizedBuildResult(delegate.run());
|
||||
}
|
||||
|
||||
private class NormalizedBuildResult implements BuildResult {
|
||||
private BuildResult delegate;
|
||||
private String normalizedString;
|
||||
|
|
|
@ -228,6 +228,11 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
tasks.withType(Test).configureEach { t ->
|
||||
println "paaath: " + t.path
|
||||
}
|
||||
}
|
||||
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
|
||||
configs = project.configurations
|
||||
if (project.path.contains("fixture")) {
|
||||
|
|
|
@ -14,8 +14,13 @@ group = 'org.elasticsearch.client'
|
|||
// Not published so no need to assemble
|
||||
tasks.named("assemble").configure { enabled = true }
|
||||
|
||||
archivesBaseName = 'client-benchmarks'
|
||||
mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain'
|
||||
base {
|
||||
archivesName = 'client-benchmarks'
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = 'org.elasticsearch.client.benchmark.BenchmarkMain'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'org.apache.commons:commons-math3:3.2'
|
||||
|
|
|
@ -14,7 +14,10 @@ apply plugin: 'elasticsearch.publish'
|
|||
apply plugin: 'elasticsearch.rest-resources'
|
||||
|
||||
group = 'org.elasticsearch.client'
|
||||
archivesBaseName = 'elasticsearch-rest-high-level-client'
|
||||
|
||||
base {
|
||||
archivesName = 'elasticsearch-rest-high-level-client'
|
||||
}
|
||||
|
||||
// HLRC is published under the Elastic License
|
||||
projectLicenses.set(['Elastic License 2.0': ext.elasticLicenseUrl.get()])
|
||||
|
|
|
@ -24,11 +24,16 @@ import org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersTas
|
|||
apply plugin: 'elasticsearch.build'
|
||||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
group = 'org.elasticsearch.client'
|
||||
archivesBaseName = 'elasticsearch-rest-client'
|
||||
|
||||
base {
|
||||
archivesName = 'elasticsearch-rest-client'
|
||||
}
|
||||
|
||||
// LLRC is licenses under Apache 2.0
|
||||
projectLicenses.set(['The Apache Software License, Version 2.0': 'http://www.apache.org/licenses/LICENSE-2.0'])
|
||||
|
|
|
@ -21,11 +21,15 @@ import org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersTas
|
|||
apply plugin: 'elasticsearch.build'
|
||||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
group = 'org.elasticsearch.client'
|
||||
archivesBaseName = 'elasticsearch-rest-client-sniffer'
|
||||
base {
|
||||
archivesName = 'elasticsearch-rest-client-sniffer'
|
||||
}
|
||||
|
||||
// rest client sniffer is licenses under Apache 2.0
|
||||
projectLicenses.set(['The Apache Software License, Version 2.0': 'http://www.apache.org/licenses/LICENSE-2.0'])
|
||||
|
|
|
@ -9,8 +9,10 @@ import org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersTas
|
|||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
group = "${group}.client.test"
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@ tasks.named("processJavaRestTestResources").configure {
|
|||
}
|
||||
|
||||
// make the pom file name use elasticsearch instead of the project name
|
||||
archivesBaseName = "elasticsearch"
|
||||
base {
|
||||
archivesName = "elasticsearch"
|
||||
}
|
||||
ext.buildDist = parent.tasks.named("buildIntegTestZip")
|
||||
|
||||
publishing {
|
||||
|
|
|
@ -43,7 +43,7 @@ import java.util.regex.Pattern
|
|||
*/
|
||||
|
||||
plugins {
|
||||
id "nebula.ospackage-base" version "8.6.1"
|
||||
id "com.netflix.nebula.ospackage-base" version "11.0.0"
|
||||
}
|
||||
|
||||
void addProcessFilesTask(String type, boolean oss, boolean jdk) {
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
|
||||
archivesBaseName = 'elasticsearch-geoip-cli'
|
||||
base {
|
||||
archivesName = 'elasticsearch-geoip-cli'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
apply plugin: 'elasticsearch.build'
|
||||
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
// java_version_checker do not depend on core so only JDK signatures should be checked
|
||||
tasks.named('forbiddenApisMain').configure {
|
||||
|
|
|
@ -17,7 +17,9 @@ dependencies {
|
|||
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
|
||||
}
|
||||
|
||||
archivesBaseName = 'elasticsearch-launchers'
|
||||
base {
|
||||
archivesName = 'elasticsearch-launchers'
|
||||
}
|
||||
|
||||
tasks.withType(CheckForbiddenApis).configureEach {
|
||||
replaceSignatureFiles 'jdk-signatures', 'snakeyaml-signatures'
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
|
||||
archivesBaseName = 'elasticsearch-plugin-cli'
|
||||
base {
|
||||
archivesName = 'elasticsearch-plugin-cli'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -33,7 +33,7 @@ junit5-vintage = { group = "org.junit.vintage", name="junit-vintage-engine", ver
|
|||
maven-model = "org.apache.maven:maven-model:3.6.2"
|
||||
mockito-core = "org.mockito:mockito-core:1.9.5"
|
||||
nebula-info = "com.netflix.nebula:gradle-info-plugin:11.3.3"
|
||||
shadow-plugin = "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
|
||||
shadow-plugin = "com.github.johnrengelman:shadow:8.1.1"
|
||||
spock-core = { group = "org.spockframework", name="spock-core", version.ref="spock" }
|
||||
spock-junit4 = { group = "org.spockframework", name="spock-junit4", version.ref="spock" }
|
||||
spock-platform = { group = "org.spockframework", name="spock-bom", version.ref="spock" }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.1.xsd">
|
||||
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.2.xsd">
|
||||
<configuration>
|
||||
<verify-metadata>false</verify-metadata>
|
||||
<verify-signatures>false</verify-signatures>
|
||||
|
@ -399,6 +399,11 @@
|
|||
<sha256 value="df7e2d5b8319efd51d015ab5071a271f8463158bc2f0979d05393fe028d856a0" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.johnrengelman" name="shadow" version="8.1.1">
|
||||
<artifact name="shadow-8.1.1.jar">
|
||||
<sha256 value="084197555590a53bb21b59508a3330559f536ddb448eafd1ec675f5462036fcf" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.github.spotbugs" name="spotbugs-annotations" version="4.0.2">
|
||||
<artifact name="spotbugs-annotations-4.0.2.jar">
|
||||
<sha256 value="3ef6c9f822b601aa151e10e123b49e5604243a4a99bcc47e4e1f9eea9781dc63" origin="Generated by Gradle"/>
|
||||
|
@ -939,9 +944,9 @@
|
|||
<sha256 value="d694edd7bae3bc1a8e0dae2f5a22c479ff04d6b9bfcb0ab751a42f02e02d2100" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.netflix.nebula" name="gradle-ospackage-plugin" version="8.6.1">
|
||||
<artifact name="gradle-ospackage-plugin-8.6.1.jar">
|
||||
<sha256 value="e6700b0e41d4675b289986b4b6817c03baeb1a05cd758d69902c92fd2f777a89" origin="Generated by Gradle"/>
|
||||
<component group="com.netflix.nebula" name="gradle-ospackage-plugin" version="11.0.0">
|
||||
<artifact name="gradle-ospackage-plugin-11.0.0.jar">
|
||||
<sha256 value="d8bd5525b6af61be47ac3790f11604a1549a7791f5f13708bbd517f3791baf94" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.netflix.nebula" name="nebula-gradle-interop" version="2.0.0">
|
||||
|
@ -1279,11 +1284,6 @@
|
|||
<sha256 value="2c52a6fabd5af9331d73fc7787dafc32a56bd8019c49f89749c2eeef244e303c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="gradle.plugin.com.github.johnrengelman" name="shadow" version="7.1.2">
|
||||
<artifact name="shadow-7.1.2.jar">
|
||||
<sha256 value="bf705cc2ea5c0180aa870a0fa80b39bf13a14d27128e1eb3a4b674be34f58e90" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="gradle.plugin.org.jetbrains.gradle.plugin.idea-ext" name="gradle-idea-ext" version="1.1.4">
|
||||
<artifact name="gradle-idea-ext-1.1.4.jar">
|
||||
<sha256 value="97d371d6996c3c510b5d6f0298dd541229b63248decc61159b73ab9ed59e777d" origin="Generated by Gradle"/>
|
||||
|
@ -1964,6 +1964,11 @@
|
|||
<sha256 value="5c6a438c3ebe7a306eba452b09fa307b0e60314926177920bca896c4a504eaf6" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.ant" name="ant" version="1.10.13">
|
||||
<artifact name="ant-1.10.13.jar">
|
||||
<sha256 value="befbfc79e744e9892cfa7db96df3b6e82dc17d2571af42aa427976fc22299838" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.ant" name="ant-launcher" version="1.10.11">
|
||||
<artifact name="ant-launcher-1.10.11.jar">
|
||||
<sha256 value="dab530df7a980b5ac8fd7e8d208243ae0d3ebd6de09b1aa2ce756360cc2ed256" origin="Generated by Gradle"/>
|
||||
|
@ -1974,6 +1979,11 @@
|
|||
<sha256 value="42a7ca7e7bb777fe7ee75a5ed4cc529c766bc43486367fdaad0ab4a32ee9c249" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.ant" name="ant-launcher" version="1.10.13">
|
||||
<artifact name="ant-launcher-1.10.13.jar">
|
||||
<sha256 value="cd7695b3bfb6964ab71b6a0b31dad60005ae77fe502132364679aacf08f77970" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.avro" name="avro" version="1.7.4">
|
||||
<artifact name="avro-1.7.4.jar">
|
||||
<sha256 value="a01d26e9a5ed0754e8c88dbb373fba896c57df0a0c424185767a3857855bb222" origin="Generated by Gradle"/>
|
||||
|
@ -2777,11 +2787,21 @@
|
|||
<sha256 value="b0d8a4c8ab4fb8b1888d0095822703b0e6d4793c419550203da9e69196161de4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.logging.log4j" name="log4j-api" version="2.20.0">
|
||||
<artifact name="log4j-api-2.20.0.jar">
|
||||
<sha256 value="2f43eea679ea66f14ca0f13fec2a8600ac124f5a5231dcb4df8393eddcb97550" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.logging.log4j" name="log4j-core" version="2.17.1">
|
||||
<artifact name="log4j-core-2.17.1.jar">
|
||||
<sha256 value="c967f223487980b9364e94a7c7f9a8a01fd3ee7c19bdbf0b0f9f8cb8511f3d41" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.logging.log4j" name="log4j-core" version="2.20.0">
|
||||
<artifact name="log4j-core-2.20.0.jar">
|
||||
<sha256 value="6137df848cdaed9f4d5076f75513c6c85da80b953f4e7acca38098b770763f55" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.apache.logging.log4j" name="log4j-jcl" version="2.17.1">
|
||||
<artifact name="log4j-jcl-2.17.1.jar">
|
||||
<sha256 value="1cbec979d2f6e545ced9829bdb8901fcb8f5af1abfac313cdb5a7a642fc921ad" origin="Generated by Gradle"/>
|
||||
|
@ -3170,6 +3190,11 @@
|
|||
<sha256 value="52d85e04b3918722af11d12855b4a8257df96a0e76c8f4e3852e6faa851f357b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.codehaus.plexus" name="plexus-utils" version="3.5.1">
|
||||
<artifact name="plexus-utils-3.5.1.jar">
|
||||
<sha256 value="86e0255d4c879c61b4833ed7f13124e8bb679df47debb127326e7db7dd49a07b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.codehaus.woodstox" name="stax2-api" version="4.2">
|
||||
<artifact name="stax2-api-4.2.jar">
|
||||
<sha256 value="badf6081a0bb526fd2c01951dfefad91b6846b6dd0eb0048587e30d1dd334e68" origin="Generated by Gradle"/>
|
||||
|
@ -3430,6 +3455,11 @@
|
|||
<sha256 value="1345f11ba606d15603d6740551a8c21947c0215640770ec67271fe78bea97cf5" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.jdom" name="jdom2" version="2.0.6.1">
|
||||
<artifact name="jdom2-2.0.6.1.jar">
|
||||
<sha256 value="0b20f45e3a0fd8f0d12cdc5316b06776e902b1365db00118876f9175c60f302c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.jetbrains" name="annotations" version="20.1.0">
|
||||
<artifact name="annotations-20.1.0.jar">
|
||||
<sha256 value="edc8e3ec9796a5f41c1ae44b2d318507ee6ac1212f121d93d33699b3d0aff638" origin="Generated by Gradle"/>
|
||||
|
@ -3820,6 +3850,11 @@
|
|||
<sha256 value="1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.ow2.asm" name="asm" version="9.4">
|
||||
<artifact name="asm-9.4.jar">
|
||||
<sha256 value="39d0e2b3dc45af65a09b097945750a94a126e052e124f93468443a1d0e15f381" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.ow2.asm" name="asm-analysis" version="7.1">
|
||||
<artifact name="asm-analysis-7.1.jar">
|
||||
<sha256 value="4612c0511a63db2a2570f07ad1959e19ed8eb703e4114da945cb85682519a55c" origin="Generated by Gradle"/>
|
||||
|
@ -3860,6 +3895,11 @@
|
|||
<sha256 value="be4ce53138a238bb522cd781cf91f3ba5ce2f6ca93ec62d46a162a127225e0a6" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.ow2.asm" name="asm-commons" version="9.4">
|
||||
<artifact name="asm-commons-9.4.jar">
|
||||
<sha256 value="0c128a9ec3f33c98959272f6d16cf14247b508f58951574bcdbd2b56d6326364" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.ow2.asm" name="asm-tree" version="5.0.4">
|
||||
<artifact name="asm-tree-5.0.4.jar">
|
||||
<sha256 value="c3670fa836fac4cde743840f671a7d52a32eb0a844e2824eaedaf3a47f5c8399" origin="Generated by Gradle"/>
|
||||
|
@ -3890,6 +3930,11 @@
|
|||
<sha256 value="ae629c2609f39681ef8d140a42a23800464a94f2d23e36d8f25cd10d5e4caff4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.ow2.asm" name="asm-tree" version="9.4">
|
||||
<artifact name="asm-tree-9.4.jar">
|
||||
<sha256 value="c42d479cf24566a21eb20af7eeaeef4e86bdb4a886306cf72f483b65e75b2acf" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.ow2.asm" name="asm-util" version="7.2">
|
||||
<artifact name="asm-util-7.2.jar">
|
||||
<sha256 value="6e24913b021ffacfe8e7e053d6e0ccc731941148cfa078d4f1ed3d96904530f8" origin="Generated by Gradle"/>
|
||||
|
@ -4030,6 +4075,11 @@
|
|||
<sha256 value="d63efd5746ff408943a7dd7ef85ae9f09aa7fb63bb2b16911427ce6c45b59fd0" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.vafer" name="jdependency" version="2.8.0">
|
||||
<artifact name="jdependency-2.8.0.jar">
|
||||
<sha256 value="bfd2cc7e1bfc78aa83b44c0a54bf2cde38a4382ec24728af683d98dc6be78192" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.xerial.snappy" name="snappy-java" version="1.0.4.1">
|
||||
<artifact name="snappy-java-1.0.4.1.jar">
|
||||
<sha256 value="52533e94f79beacb9862bac33fa2e2fc724a8cfb2a739c33ae4ea10515f2bb86" origin="Generated by Gradle"/>
|
||||
|
|
6
gradle/wrapper/gradle-wrapper.properties
vendored
6
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,8 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
||||
distributionSha256Sum=5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionSha256Sum=db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219
|
||||
|
|
5
gradlew
vendored
5
gradlew
vendored
|
@ -133,11 +133,14 @@ location of your Java installation."
|
|||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
|
|
|
@ -10,7 +10,9 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
|
||||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
archivesBaseName = 'elasticsearch-core'
|
||||
base {
|
||||
archivesName = 'elasticsearch-core'
|
||||
}
|
||||
|
||||
// we want to keep the JDKs in our IDEs set to JDK 8 until minimum JDK is bumped to 11 so we do not include this source set in our IDEs
|
||||
if (!isEclipse) {
|
||||
|
|
|
@ -13,7 +13,7 @@ configure(subprojects.findAll { it.parent.path == project.path }) {
|
|||
|
||||
esplugin {
|
||||
// for local ES plugins, the name of the plugin is the same as the directory
|
||||
name project.name
|
||||
name = project.name
|
||||
}
|
||||
|
||||
if (project.file('src/main/packaging').exists()) {
|
||||
|
|
|
@ -63,7 +63,7 @@ tasks.register("apiJavadoc", Javadoc) {
|
|||
source = sourceSets.main.allJava
|
||||
classpath = sourceSets.main.compileClasspath + sourceSets.main.output
|
||||
include '**/org/elasticsearch/painless/api/'
|
||||
destinationDir = new File(docsDir, 'apiJavadoc')
|
||||
destinationDir = new File(buildDir, 'docs/apiJavadoc')
|
||||
}
|
||||
|
||||
tasks.register("apiJavadocJar", Jar) {
|
||||
|
|
|
@ -10,7 +10,10 @@ apply plugin: 'elasticsearch.build'
|
|||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
group = 'org.elasticsearch.plugin'
|
||||
archivesBaseName = 'elasticsearch-scripting-painless-spi'
|
||||
|
||||
base {
|
||||
archivesName = 'elasticsearch-scripting-painless-spi'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
apply plugin: 'nebula.optional-base'
|
||||
|
||||
esplugin {
|
||||
description 'Placeholder plugin for geospatial features in ES'
|
||||
|
@ -16,8 +15,8 @@ esplugin {
|
|||
|
||||
dependencies {
|
||||
api "org.apache.lucene:lucene-spatial-extras:${versions.lucene}"
|
||||
api "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}", optional
|
||||
api "org.locationtech.jts:jts-core:${versions.jts}", optional
|
||||
api "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}"
|
||||
api "org.locationtech.jts:jts-core:${versions.jts}"
|
||||
testImplementation project(":test:framework")
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ tasks.named("dependencyLicenses").configure {
|
|||
TaskProvider<Test> pooledTest = tasks.register("pooledTest", Test) {
|
||||
include '**/*Tests.class'
|
||||
systemProperty 'es.use_unpooled_allocator', 'false'
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
}
|
||||
|
||||
TaskProvider<Test> pooledInternalClusterTest = tasks.register("pooledInternalClusterTest", Test) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
||||
distributionSha256Sum=5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionSha256Sum=db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219
|
||||
|
|
|
@ -36,8 +36,8 @@ gradle.projectsEvaluated {
|
|||
substitute module('org.elasticsearch:elasticsearch') using module("org.elasticsearch:server:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.client:elasticsearch-rest-high-level-client') using module("org.elasticsearch.client:rest-high-level:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.client:elasticsearch-rest-client') using module("org.elasticsearch.client:rest:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.plugin:x-pack-core') with module("org.elasticsearch.plugin:core:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.plugin:elasticsearch-scripting-painless-spi') with module("org.elasticsearch.plugin:spi:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.plugin:x-pack-core') using module("org.elasticsearch.plugin:core:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.plugin:elasticsearch-scripting-painless-spi') using module("org.elasticsearch.plugin:spi:${elasticsearchVersion}")
|
||||
substitute module('org.elasticsearch.distribution.integ-test-zip:elasticsearch') using variant(module("org.elasticsearch.distribution.integ-test-zip:integ-test-zip:${elasticsearchVersion}")) {
|
||||
attributes {
|
||||
attribute(Attribute.of("composite", Boolean.class), true)
|
||||
|
|
|
@ -79,6 +79,8 @@ tasks.named("bundlePlugin").configure {
|
|||
def testRepositoryCreds = tasks.register("testRepositoryCreds", Test) {
|
||||
include '**/RepositoryCredentialsTests.class'
|
||||
systemProperty 'es.allow_insecure_settings', 'true'
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
}
|
||||
|
||||
tasks.named('check').configure {
|
||||
|
|
|
@ -65,6 +65,8 @@ tasks.register("integTest", Test) {
|
|||
maxParallelForks = '1'
|
||||
include '**/*IT.class'
|
||||
systemProperty 'tests.security.manager', 'false'
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
}
|
||||
|
||||
tasks.named("check").configure {
|
||||
|
|
|
@ -9,7 +9,6 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
apply plugin: 'nebula.optional-base'
|
||||
apply plugin: 'elasticsearch.publish'
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
|
||||
|
@ -21,7 +20,9 @@ publishing {
|
|||
}
|
||||
}
|
||||
|
||||
archivesBaseName = 'elasticsearch'
|
||||
base {
|
||||
archivesName = 'elasticsearch'
|
||||
}
|
||||
|
||||
// we want to keep the JDKs in our IDEs set to JDK 8 until minimum JDK is bumped to 11 so we do not include this source set in our IDEs
|
||||
if (!isEclipse) {
|
||||
|
@ -102,7 +103,7 @@ dependencies {
|
|||
|
||||
// logging
|
||||
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
|
||||
api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional
|
||||
api "org.apache.logging.log4j:log4j-core:${versions.log4j}"
|
||||
|
||||
api "net.java.dev.jna:jna:${versions.jna}"
|
||||
|
||||
|
|
|
@ -11,8 +11,10 @@ dependencies {
|
|||
}
|
||||
|
||||
// We use updated APIs here and since this project is only used for REST testing it's ok to run with > Java 8
|
||||
java {
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
}
|
||||
|
||||
tasks.named("processResources").configure {
|
||||
from(new File(rootDir, "build-tools-internal/version.properties"))
|
||||
|
|
|
@ -7,7 +7,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.analytics.AnalyticsPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-analytics'
|
||||
base {
|
||||
archivesName = 'x-pack-analytics'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'org.apache.commons:commons-math3:3.6.1'
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.search.AsyncSearch'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-async-search'
|
||||
base {
|
||||
archivesName = 'x-pack-async-search'
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.async.AsyncResultsIndexPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-async'
|
||||
base {
|
||||
archivesName = 'x-pack-async'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -9,7 +9,9 @@ esplugin {
|
|||
hasNativeController false
|
||||
requiresKeystore true
|
||||
}
|
||||
archivesBaseName = 'x-pack-autoscaling'
|
||||
base {
|
||||
archivesName = 'x-pack-autoscaling'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -9,7 +9,9 @@ apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
|||
apply plugin: 'elasticsearch.validate-rest-spec'
|
||||
apply plugin: 'elasticsearch.internal-test-artifact'
|
||||
|
||||
archivesBaseName = 'x-pack'
|
||||
base {
|
||||
archivesName = 'x-pack'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(testArtifact(project(xpackModule('core'))))
|
||||
|
|
|
@ -8,7 +8,9 @@ esplugin {
|
|||
requiresKeystore true
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-ccr'
|
||||
base {
|
||||
archivesName = 'x-pack-ccr'
|
||||
}
|
||||
|
||||
// Integration Test classes that cannot run with the security manager
|
||||
String[] noSecurityManagerITClasses = ["**/CloseFollowerIndexIT.class"]
|
||||
|
|
|
@ -10,7 +10,9 @@ apply plugin: 'elasticsearch.internal-cluster-test'
|
|||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.internal-test-artifact'
|
||||
|
||||
archivesBaseName = 'x-pack-core'
|
||||
base {
|
||||
archivesName = 'x-pack-core'
|
||||
}
|
||||
|
||||
esplugin {
|
||||
name 'x-pack-core'
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.datastreams.DataStreamsPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-data-streams'
|
||||
base {
|
||||
archivesName = 'x-pack-data-streams'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.deprecation.Deprecation'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-deprecation'
|
||||
base {
|
||||
archivesName = 'x-pack-deprecation'
|
||||
}
|
||||
|
||||
addQaCheckDependencies()
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.enrich.EnrichPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-enrich'
|
||||
base {
|
||||
archivesName = 'x-pack-enrich'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -12,8 +12,9 @@ ext {
|
|||
// EQL dependency versions
|
||||
antlrVersion = "4.9.2"
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-eql'
|
||||
base {
|
||||
archivesName = 'x-pack-eql'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.frozen.FrozenIndices'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-frozen-indices'
|
||||
base {
|
||||
archivesName = 'x-pack-frozen-indices'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -6,7 +6,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.graph.Graph'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-graph'
|
||||
base {
|
||||
archivesName = 'x-pack-graph'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -9,7 +9,9 @@ esplugin {
|
|||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-identity-provider'
|
||||
base {
|
||||
archivesName = 'x-pack-identity-provider'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -9,7 +9,9 @@ esplugin {
|
|||
hasNativeController false
|
||||
requiresKeystore true
|
||||
}
|
||||
archivesBaseName = 'x-pack-ilm'
|
||||
base {
|
||||
archivesName = 'x-pack-ilm'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -8,7 +8,9 @@ esplugin {
|
|||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-logstash'
|
||||
base {
|
||||
archivesName = 'x-pack-logstash'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -15,7 +15,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.aggregatemetric.AggregateMetricMapperPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-aggregate-metric'
|
||||
base {
|
||||
archivesName = 'x-pack-aggregate-metric'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -7,7 +7,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.constantkeyword.ConstantKeywordMapperPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-constant-keyword'
|
||||
base {
|
||||
archivesName = 'x-pack-constant-keyword'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -16,7 +16,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.unsignedlong.UnsignedLongMapperPlugin'
|
||||
extendedPlugins = ['x-pack-core', 'lang-painless']
|
||||
}
|
||||
archivesBaseName = 'x-pack-unsigned-long'
|
||||
base {
|
||||
archivesName = 'x-pack-unsigned-long'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(':modules:lang-painless:spi')
|
||||
|
|
|
@ -9,7 +9,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.versionfield.VersionFieldPlugin'
|
||||
extendedPlugins = ['x-pack-core', 'lang-painless']
|
||||
}
|
||||
archivesBaseName = 'x-pack-mapper-version'
|
||||
base {
|
||||
archivesName = 'x-pack-mapper-version'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -8,7 +8,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.monitoring.Monitoring'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-monitoring'
|
||||
base {
|
||||
archivesName = 'x-pack-monitoring'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -11,8 +11,9 @@ esplugin {
|
|||
ext {
|
||||
antlrVersion = "4.9.2"
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-ql'
|
||||
base {
|
||||
archivesName = 'x-pack-ql'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "org.antlr:antlr4-runtime:${antlrVersion}"
|
||||
|
|
|
@ -7,7 +7,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.repositories.metering.RepositoriesMeteringPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-repositories-metering-api'
|
||||
base {
|
||||
archivesName = 'x-pack-repositories-metering-api'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -8,7 +8,10 @@ esplugin {
|
|||
classname 'org.elasticsearch.repositories.encrypted.EncryptedRepositoryPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-repository-encrypted'
|
||||
|
||||
base {
|
||||
archivesName = 'x-pack-repository-encrypted'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// necessary for the license check
|
||||
|
|
|
@ -8,7 +8,9 @@ esplugin {
|
|||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-rollup'
|
||||
base {
|
||||
archivesName = 'x-pack-rollup'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -7,7 +7,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.searchbusinessrules.SearchBusinessRules'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-searchbusinessrules'
|
||||
base {
|
||||
archivesName = 'x-pack-searchbusinessrules'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -8,7 +8,10 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshots'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-searchable-snapshots'
|
||||
|
||||
base {
|
||||
archivesName = 'x-pack-searchable-snapshots'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
|
||||
archivesBaseName = 'preallocate'
|
||||
base {
|
||||
archivesName = 'preallocate'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -13,7 +13,9 @@ esplugin {
|
|||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-security'
|
||||
base {
|
||||
archivesName = 'x-pack-security'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -3,7 +3,9 @@ import org.elasticsearch.gradle.internal.info.BuildParams
|
|||
|
||||
apply plugin: 'elasticsearch.build'
|
||||
|
||||
archivesBaseName = 'elasticsearch-security-cli'
|
||||
base {
|
||||
archivesName = 'elasticsearch-security-cli'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":server")
|
||||
|
|
|
@ -9,7 +9,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.shutdown.ShutdownPlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-shutdown'
|
||||
base {
|
||||
archivesName = 'x-pack-shutdown'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -8,7 +8,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.repositories.blobstore.testkit.SnapshotRepositoryTestKit'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-snapshot-repo-test-kit'
|
||||
base {
|
||||
archivesName = 'x-pack-snapshot-repo-test-kit'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(xpackModule('core'))
|
||||
|
|
|
@ -4,9 +4,9 @@ apply plugin: 'elasticsearch.internal-cluster-test'
|
|||
import org.elasticsearch.gradle.internal.info.BuildParams
|
||||
|
||||
esplugin {
|
||||
name 'x-pack-sql'
|
||||
name = 'x-pack-sql'
|
||||
description 'The Elasticsearch plugin that powers SQL for Elasticsearch'
|
||||
classname 'org.elasticsearch.xpack.sql.plugin.SqlPlugin'
|
||||
classname = 'org.elasticsearch.xpack.sql.plugin.SqlPlugin'
|
||||
extendedPlugins = ['x-pack-ql', 'lang-painless']
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,9 @@ configurations {
|
|||
bin
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-sql'
|
||||
base {
|
||||
archivesName = 'x-pack-sql'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -3,7 +3,10 @@ apply plugin: 'elasticsearch.publish'
|
|||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
description = 'JDBC driver for Elasticsearch'
|
||||
archivesBaseName = "x-pack-sql-jdbc"
|
||||
|
||||
base {
|
||||
archivesName = "x-pack-sql-jdbc"
|
||||
}
|
||||
|
||||
tasks.named('forbiddenApisMain').configure {
|
||||
// does not depend on core, so only jdk and http signatures should be checked
|
||||
|
|
|
@ -44,7 +44,7 @@ subprojects {
|
|||
|
||||
tasks.withType(RestIntegTestTask).configureEach {
|
||||
dependsOn copyTestClasses
|
||||
classpath = configurations.testArtifacts
|
||||
classpath += configurations.testArtifacts
|
||||
testClassesDirs = project.files(testArtifactsDir)
|
||||
nonInputProperties.systemProperty 'tests.audit.logfile',
|
||||
"${-> testClusters.javaRestTest.singleNode().getAuditLog()}"
|
||||
|
|
|
@ -12,7 +12,9 @@ apply plugin: 'com.github.johnrengelman.shadow'
|
|||
/* We don't use the 'application' plugin because it builds a zip and tgz which
|
||||
* we don't want. */
|
||||
|
||||
archivesBaseName = 'elasticsearch-sql-cli'
|
||||
base {
|
||||
archivesName = 'elasticsearch-sql-cli'
|
||||
}
|
||||
|
||||
description = 'Command line interface to Elasticsearch that speaks SQL'
|
||||
|
||||
|
|
|
@ -8,10 +8,12 @@ esplugin {
|
|||
hasNativeController false
|
||||
requiresKeystore true
|
||||
}
|
||||
archivesBaseName = 'x-pack-stack'
|
||||
base {
|
||||
archivesName = 'x-pack-stack'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
testImplementation(testArtifact(project(xpackModule('core'))))}
|
||||
|
||||
addQaCheckDependencies()
|
||||
addQaCheckDependencies(project)
|
|
@ -5,7 +5,9 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.textstructure.TextStructurePlugin'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-text-structure'
|
||||
base {
|
||||
archivesName = 'x-pack-text-structure'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -6,7 +6,10 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.vectors.DenseVectorPlugin'
|
||||
extendedPlugins = ['x-pack-core', 'lang-painless']
|
||||
}
|
||||
archivesBaseName = 'x-pack-vectors'
|
||||
|
||||
base {
|
||||
archivesName = 'x-pack-vectors'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(':modules:lang-painless:spi')
|
||||
|
|
|
@ -12,7 +12,9 @@ esplugin {
|
|||
extendedPlugins = ['x-pack-core', 'lang-painless']
|
||||
}
|
||||
|
||||
archivesBaseName = 'x-pack-watcher'
|
||||
base {
|
||||
archivesName = 'x-pack-watcher'
|
||||
}
|
||||
|
||||
ext.compactProfile = 'full'
|
||||
|
||||
|
|
|
@ -6,7 +6,10 @@ esplugin {
|
|||
classname 'org.elasticsearch.xpack.wildcard.Wildcard'
|
||||
extendedPlugins = ['x-pack-core']
|
||||
}
|
||||
archivesBaseName = 'x-pack-wildcard'
|
||||
|
||||
base {
|
||||
archivesName = 'x-pack-wildcard'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'))
|
||||
|
|
|
@ -47,10 +47,11 @@ def encodedCredentials = {
|
|||
|
||||
def gcsThirdPartyTest = tasks.register("gcsThirdPartyTest", Test) {
|
||||
include '**/GCSCleanupTests.class'
|
||||
|
||||
systemProperty 'tests.security.manager', false
|
||||
|
||||
systemProperty 'test.google.bucket', gcsBucket
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
|
||||
nonInputProperties.systemProperty 'test.google.base', gcsBasePath ? gcsBasePath + "_snapshot_tool_tests" + BuildParams.testSeed : 'base_path'
|
||||
nonInputProperties.systemProperty 'test.google.account', "${-> encodedCredentials.call()}"
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ def s3ThirdPartyTest = tasks.register("s3ThirdPartyTest", Test) {
|
|||
systemProperty 'test.s3.account', s3PermanentAccessKey
|
||||
systemProperty 'test.s3.key', s3PermanentSecretKey
|
||||
systemProperty 'test.s3.bucket', s3PermanentBucket
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
nonInputProperties.systemProperty 'test.s3.base', s3PermanentBasePath ? s3PermanentBasePath + "_snapshot_tool_tests" + BuildParams.testSeed : 'base_path'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
apply plugin: 'elasticsearch.build'
|
||||
group = 'org.elasticsearch.client'
|
||||
archivesBaseName = 'x-pack-transport'
|
||||
|
||||
base {
|
||||
archivesName = 'x-pack-transport'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// this "api" dependency looks weird, but it is correct, as it contains
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue