diff --git a/build-tools-internal/gradle/wrapper/gradle-wrapper.properties b/build-tools-internal/gradle/wrapper/gradle-wrapper.properties index b8cea9f02a5b..2a6e21b2ba89 100644 --- a/build-tools-internal/gradle/wrapper/gradle-wrapper.properties +++ b/build-tools-internal/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip +distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/distribution/archives/build.gradle b/build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/distribution/archives/build.gradle index c671c18cad03..cf74de228658 100644 --- a/build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/distribution/archives/build.gradle +++ b/build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/distribution/archives/build.gradle @@ -34,7 +34,7 @@ subprojects { } def calculateBranchVersion() { - File f = rootProject.file(".git/refs/heads/origin") + File f = layout.settingsDirectory.file(".git/refs/heads/origin").asFile def branchName = f.list()?.first().trim() return branchName + ".1" diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java index 2b79bc2b9173..6a1df303d6d9 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java @@ -39,7 +39,7 @@ public class BaseInternalPluginBuildPlugin implements Plugin { project.getPluginManager().apply(JarHellPrecommitPlugin.class); project.getPluginManager().apply(ElasticsearchJavaPlugin.class); project.getPluginManager().apply(ClusterFeaturesMetadataPlugin.class); - boolean isCi = project.getRootProject().getExtensions().getByType(BuildParameterExtension.class).isCi(); + boolean isCi = project.getRootProject().getExtensions().getByType(BuildParameterExtension.class).getCi(); // Clear default dependencies added by public PluginBuildPlugin as we add our // own project dependencies for internal builds // TODO remove once we removed default dependencies from PluginBuildPlugin diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java index ce779343dfea..70f6cecb8e72 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java @@ -161,7 +161,7 @@ public class ElasticsearchJavaBasePlugin implements Plugin { compileTask.getConventionMapping().map("sourceCompatibility", () -> java.getSourceCompatibility().toString()); compileTask.getConventionMapping().map("targetCompatibility", () -> java.getTargetCompatibility().toString()); compileOptions.getRelease().set(releaseVersionProviderFromCompileTask(project, compileTask)); - compileOptions.setIncremental(buildParams.isCi() == false); + compileOptions.setIncremental(buildParams.getCi() == false); }); // also apply release flag to groovy, which is used in build-tools project.getTasks().withType(GroovyCompile.class).configureEach(compileTask -> { diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java index fea895f90f91..2d72c4eeaeb0 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java @@ -73,7 +73,7 @@ public class InternalDistributionBwcSetupPlugin implements Plugin { project.getPlugins().apply(JvmToolchainsPlugin.class); toolChainService = project.getExtensions().getByType(JavaToolchainService.class); var buildParams = loadBuildParams(project).get(); - Boolean isCi = buildParams.isCi(); + Boolean isCi = buildParams.getCi(); buildParams.getBwcVersions().forPreviousUnreleased((BwcVersions.UnreleasedVersionInfo unreleasedVersion) -> { configureBwcProject( project.project(unreleasedVersion.gradleProjectPath()), @@ -365,7 +365,7 @@ public class InternalDistributionBwcSetupPlugin implements Plugin { } else { c.getOutputs().files(expectedOutputFile); } - c.getOutputs().doNotCacheIf("BWC distribution caching is disabled for local builds", task -> buildParams.isCi() == false); + c.getOutputs().doNotCacheIf("BWC distribution caching is disabled for local builds", task -> buildParams.getCi() == false); c.getArgs().add("-p"); c.getArgs().add(projectPath); c.getArgs().add(assembleTaskName); diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalTestClustersPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalTestClustersPlugin.java index c618fe6c2e1b..f1b96016286d 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalTestClustersPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalTestClustersPlugin.java @@ -30,7 +30,7 @@ public class InternalTestClustersPlugin implements Plugin { TestClustersPlugin testClustersPlugin = project.getPlugins().apply(TestClustersPlugin.class); testClustersPlugin.setRuntimeJava(buildParams.getRuntimeJavaHome()); testClustersPlugin.setIsReleasedVersion( - version -> (version.equals(VersionProperties.getElasticsearchVersion()) && buildParams.isSnapshotBuild() == false) + version -> (version.equals(VersionProperties.getElasticsearchVersion()) && buildParams.getSnapshotBuild() == false) || buildParams.getBwcVersions().unreleasedInfo(version) == null ); diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportPlugin.java index 7348181c4199..7ec35ccd32e1 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportPlugin.java @@ -40,7 +40,7 @@ public class DockerSupportPlugin implements Plugin { .getSharedServices() .registerIfAbsent(DOCKER_SUPPORT_SERVICE_NAME, DockerSupportService.class, spec -> spec.parameters(params -> { params.setExclusionsFile(new File(project.getRootDir(), DOCKER_ON_LINUX_EXCLUSIONS_FILE)); - params.getIsCI().set(buildParams.isCi()); + params.getIsCI().set(buildParams.getCi()); })); // Ensure that if we are trying to run any DockerBuildTask tasks, we assert an available Docker installation exists diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/BuildParameterExtension.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/BuildParameterExtension.java index ef9055b3728d..d6c8e38dac2c 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/BuildParameterExtension.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/BuildParameterExtension.java @@ -54,11 +54,11 @@ public interface BuildParameterExtension { String getTestSeed(); - Boolean isCi(); + Boolean getCi(); Integer getDefaultParallel(); - Boolean isSnapshotBuild(); + Boolean getSnapshotBuild(); BwcVersions getBwcVersions(); @@ -66,5 +66,5 @@ public interface BuildParameterExtension { Random getRandom(); - Boolean isGraalVmRuntime(); + Boolean getGraalVmRuntime(); } diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/DefaultBuildParameterExtension.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/DefaultBuildParameterExtension.java index 283c02428e4e..760664f9fa02 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/DefaultBuildParameterExtension.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/DefaultBuildParameterExtension.java @@ -42,7 +42,7 @@ public abstract class DefaultBuildParameterExtension implements BuildParameterEx private final String testSeed; private final Boolean isCi; private final Integer defaultParallel; - private final Boolean isSnapshotBuild; + private final Boolean snapshotBuild; // not final for testing private Provider bwcVersions; @@ -81,7 +81,7 @@ public abstract class DefaultBuildParameterExtension implements BuildParameterEx this.testSeed = testSeed; this.isCi = isCi; this.defaultParallel = defaultParallel; - this.isSnapshotBuild = isSnapshotBuild; + this.snapshotBuild = isSnapshotBuild; this.bwcVersions = cache(providers, bwcVersions); this.gitOrigin = gitOrigin; } @@ -183,7 +183,7 @@ public abstract class DefaultBuildParameterExtension implements BuildParameterEx } @Override - public Boolean isCi() { + public Boolean getCi() { return isCi; } @@ -193,8 +193,8 @@ public abstract class DefaultBuildParameterExtension implements BuildParameterEx } @Override - public Boolean isSnapshotBuild() { - return isSnapshotBuild; + public Boolean getSnapshotBuild() { + return snapshotBuild; } @Override @@ -208,7 +208,7 @@ public abstract class DefaultBuildParameterExtension implements BuildParameterEx } @Override - public Boolean isGraalVmRuntime() { + public Boolean getGraalVmRuntime() { return runtimeJavaDetails.get().toLowerCase().contains("graalvm"); } diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/MutedTestPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/MutedTestPlugin.java index c13a5f0e4d30..ea6e8f0f1b01 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/MutedTestPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/MutedTestPlugin.java @@ -51,7 +51,7 @@ public class MutedTestPlugin implements Plugin { } // Don't fail when all tests are ignored when running in CI - filter.setFailOnNoMatchingTests(buildParams.isCi() == false); + filter.setFailOnNoMatchingTests(buildParams.getCi() == false); }); }); } diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesDeployPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesDeployPlugin.java index a934164d11af..08484346e690 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesDeployPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesDeployPlugin.java @@ -33,7 +33,7 @@ public class TestFixturesDeployPlugin implements Plugin { var buildParams = loadBuildParams(project).get(); NamedDomainObjectContainer fixtures = project.container(TestFixtureDeployment.class); project.getExtensions().add("dockerFixtures", fixtures); - registerDeployTaskPerFixture(project, fixtures, buildParams.isCi()); + registerDeployTaskPerFixture(project, fixtures, buildParams.getCi()); project.getTasks().register(DEPLOY_FIXTURE_TASK_NAME, task -> task.dependsOn(project.getTasks().withType(DockerBuildTask.class))); } diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesPlugin.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesPlugin.java index ab28a66d9306..2c40b56c00b9 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesPlugin.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesPlugin.java @@ -131,7 +131,7 @@ public class TestFixturesPlugin implements Plugin { tasks.withType(ComposeUp.class).named("composeUp").configure(t -> { // Avoid running docker-compose tasks in parallel in CI due to some issues on certain Linux distributions - if (buildParams.isCi()) { + if (buildParams.getCi()) { t.usesService(dockerComposeThrottle); t.usesService(dockerSupport); } diff --git a/client/rest/build.gradle b/client/rest/build.gradle index 3fb2aa659586..7a07f50e4b98 100644 --- a/client/rest/build.gradle +++ b/client/rest/build.gradle @@ -37,7 +37,7 @@ base { // LLRC is licenses under Apache 2.0 projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')]) -licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt')) +licenseFile.set(layout.getSettingsDirectory().file('licenses/APACHE-LICENSE-2.0.txt').asFile) dependencies { api "org.apache.httpcomponents:httpclient:${versions.httpclient}" diff --git a/client/sniffer/build.gradle b/client/sniffer/build.gradle index 9b1cb1140311..38fc949a5c7c 100644 --- a/client/sniffer/build.gradle +++ b/client/sniffer/build.gradle @@ -33,7 +33,7 @@ base { // rest client sniffer is licenses under Apache 2.0 projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')]) -licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt')) +licenseFile.set(layout.getSettingsDirectory().file('licenses/APACHE-LICENSE-2.0.txt').asFile) dependencies { api project(":client:rest") diff --git a/client/test/build.gradle b/client/test/build.gradle index 3b7f62fd8ef5..27b1577ce309 100644 --- a/client/test/build.gradle +++ b/client/test/build.gradle @@ -19,7 +19,7 @@ group = "${group}.client.test" // rest client sniffer is licenses under Apache 2.0 projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')]) -licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt')) +licenseFile.set(layout.getSettingsDirectory().file('licenses/APACHE-LICENSE-2.0.txt').asFile) dependencies { api "org.apache.httpcomponents:httpcore:${versions.httpcore}" diff --git a/distribution/archives/build.gradle b/distribution/archives/build.gradle index 7bbfb0f313e5..ddfdaa69bb39 100644 --- a/distribution/archives/build.gradle +++ b/distribution/archives/build.gradle @@ -57,13 +57,13 @@ CopySpec archiveFiles(String distributionType, String os, String architecture, b pluginsDir.getParent() } } - from(rootProject.projectDir) { + from(layout.settingsDirectory.asFile) { filePermissions { unix(0644) } include 'README.asciidoc' } - from(rootProject.file('licenses')) { + from(layout.settingsDirectory.file('licenses').asFile) { include isTestDistro ? 'AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt' : 'ELASTIC-LICENSE-2.0.txt' filePermissions { unix(0644) diff --git a/distribution/build.gradle b/distribution/build.gradle index e0302a081ce6..784d730acbf4 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -377,7 +377,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { exclude "**/platform/${excludePlatform}/**" } } - if (buildParams.isSnapshotBuild()) { + if (buildParams.getSnapshotBuild()) { from(buildExternalTestModulesTaskProvider) } if (project.path.startsWith(':distribution:packages')) { @@ -518,9 +518,9 @@ subprojects { String licenseText if (isTestDistro) { - licenseText = rootProject.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').getText('UTF-8') + licenseText = layout.settingsDirectory.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile.getText('UTF-8') } else { - licenseText = rootProject.file('licenses/ELASTIC-LICENSE-2.0.txt').getText('UTF-8') + licenseText = layout.settingsDirectory.file('licenses/ELASTIC-LICENSE-2.0.txt').asFile.getText('UTF-8') } // license text needs to be indented with a single space licenseText = ' ' + licenseText.replace('\n', '\n ') diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index 204cfc18950a..df2301901873 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -119,7 +119,7 @@ ext.expansions = { Architecture architecture, DockerBase base -> // the image. When developing the Docker images, it's very tedious to completely rebuild // an image for every single change. Therefore, outside of CI, we fix the // build time to midnight so that the Docker build cache is usable. - def buildDate = buildParams.isCi() ? buildParams.buildDate : buildParams.buildDate.truncatedTo(ChronoUnit.DAYS).toString() + def buildDate = buildParams.ci ? buildParams.buildDate : buildParams.buildDate.truncatedTo(ChronoUnit.DAYS).toString() return [ 'arch' : architecture.classifier, @@ -389,7 +389,7 @@ void addBuildDockerImageTask(Architecture architecture, DockerBase base) { dockerContext.fileProvider(transformTask.map { Sync task -> task.getDestinationDir() }) - noCache = buildParams.isCi() + noCache = buildParams.ci tags = generateTags(base, architecture) platforms.add(architecture.dockerPlatform) @@ -484,7 +484,7 @@ void addBuildEssDockerImageTask(Architecture architecture) { dockerContext.fileProvider(buildContextTask.map { it.getDestinationDir() }) - noCache = buildParams.isCi() + noCache = buildParams.ci baseImages = [] tags = generateTags(dockerBase, architecture) platforms.add(architecture.dockerPlatform) diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index b7ba4e32edae..9129c9a12fc9 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -43,7 +43,7 @@ import java.util.regex.Pattern */ plugins { - id "com.netflix.nebula.ospackage-base" version "11.10.1" + alias(buildLibs.plugins.ospackage) } ['deb', 'rpm'].each { type -> @@ -174,7 +174,7 @@ def commonPackageConfig(String type, String architecture) { } else { assert type == 'rpm' into('/usr/share/elasticsearch') { - from(rootProject.file('licenses')) { + from(layout.settingsDirectory.file('licenses').asFile) { include 'ELASTIC-LICENSE-2.0.txt' rename { 'LICENSE.txt' } } @@ -300,7 +300,7 @@ ospackage { url = 'https://www.elastic.co/' // signing setup - if (project.hasProperty('signing.password') && buildParams.isSnapshotBuild() == false) { + if (project.hasProperty('signing.password') && buildParams.snapshotBuild == false) { signingKeyId = project.hasProperty('signing.keyId') ? project.property('signing.keyId') : 'D88E42B4' signingKeyPassphrase = project.property('signing.password') signingKeyRingFile = project.hasProperty('signing.secretKeyRingFile') ? diff --git a/docs/build.gradle b/docs/build.gradle index 0ebb4b498eab..8465fa8bef76 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -38,7 +38,7 @@ ext.docsFileTree = fileTree(projectDir) { tasks.named("yamlRestTest") { enabled = false - if (buildParams.isSnapshotBuild() == false) { + if (buildParams.snapshotBuild == false) { // LOOKUP is not available in snapshots systemProperty 'tests.rest.blacklist', [ "reference/esql/processing-commands/lookup/esql-lookup-example" @@ -84,7 +84,7 @@ testClusters.matching { it.name == "yamlRestTest"}.configureEach { setting 'xpack.license.self_generated.type', 'trial' setting 'indices.lifecycle.history_index_enabled', 'false' keystorePassword 'keystore-password' - if (buildParams.isSnapshotBuild() == false) { + if (buildParams.snapshotBuild == false) { requiresFeature 'es.failure_store_feature_flag_enabled', new Version(8, 12, 0) } } diff --git a/gradle/build.versions.toml b/gradle/build.versions.toml index e86a6fe50586..822514abaa40 100644 --- a/gradle/build.versions.toml +++ b/gradle/build.versions.toml @@ -47,3 +47,6 @@ spock-platform = { group = "org.spockframework", name="spock-bom", version.ref=" spotless-plugin = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" wiremock = "com.github.tomakehurst:wiremock-jre8-standalone:2.23.2" xmlunit-core = "org.xmlunit:xmlunit-core:2.8.2" + +[plugins] +ospackage = { id = "com.netflix.nebula.ospackage-base", version = "11.11.1" } diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index d66802f49b4c..010ac5528f46 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -949,9 +949,9 @@ - - - + + + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b9530d6..9bbc975c742b 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b8cea9f02a5b..2a6e21b2ba89 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip +distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index f3b75f3b0d4f..faf93008b77e 100755 --- a/gradlew +++ b/gradlew @@ -205,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. diff --git a/libs/h3/build.gradle b/libs/h3/build.gradle index 6036323e160f..919050055b1b 100644 --- a/libs/h3/build.gradle +++ b/libs/h3/build.gradle @@ -36,7 +36,7 @@ tasks.named('forbiddenApisMain').configure { } ext.projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')]) -licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt')) +licenseFile.set(layout.settingsDirectory.file('licenses/APACHE-LICENSE-2.0.txt').asFile) tasks.withType(LicenseHeadersTask.class).configureEach { approvedLicenses = ['Apache', 'Generated', 'Vendored'] diff --git a/libs/tdigest/build.gradle b/libs/tdigest/build.gradle index b79a6ce0a486..47fc0dbc239c 100644 --- a/libs/tdigest/build.gradle +++ b/libs/tdigest/build.gradle @@ -37,7 +37,7 @@ tasks.named('forbiddenApisMain').configure { } ext.projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')]) -licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt')) +licenseFile.set(layout.settingsDirectory.file('licenses/APACHE-LICENSE-2.0.txt').asFile) tasks.withType(LicenseHeadersTask.class).configureEach { approvedLicenses = ['Apache', 'Generated', 'Vendored'] diff --git a/modules/aggregations/build.gradle b/modules/aggregations/build.gradle index d65b6e8fd2dd..70e679c9d786 100644 --- a/modules/aggregations/build.gradle +++ b/modules/aggregations/build.gradle @@ -26,7 +26,7 @@ restResources { } } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' } diff --git a/modules/data-streams/build.gradle b/modules/data-streams/build.gradle index bf961dcf4297..62c3efdc5ecc 100644 --- a/modules/data-streams/build.gradle +++ b/modules/data-streams/build.gradle @@ -35,7 +35,7 @@ if (buildParams.inFipsJvm){ tasks.named("yamlRestTest").configure{enabled = false } } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.withType(Test).configureEach { systemProperty 'es.failure_store_feature_flag_enabled', 'true' } diff --git a/modules/legacy-geo/build.gradle b/modules/legacy-geo/build.gradle index 4ed8d84ab96b..f26c82889764 100644 --- a/modules/legacy-geo/build.gradle +++ b/modules/legacy-geo/build.gradle @@ -24,7 +24,7 @@ dependencies { testImplementation project(":test:framework") } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' } diff --git a/plugins/analysis-icu/build.gradle b/plugins/analysis-icu/build.gradle index 0d576d316f85..c96c86976ac5 100644 --- a/plugins/analysis-icu/build.gradle +++ b/plugins/analysis-icu/build.gradle @@ -26,7 +26,7 @@ dependencies { api "com.ibm.icu:icu4j:${versions.icu4j}" } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' } diff --git a/plugins/build.gradle b/plugins/build.gradle index 32fd646ef0be..ba9d7851d9d9 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -23,11 +23,9 @@ 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 - - licenseFile = rootProject.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } - parent.artifacts.add('allPlugins', tasks.named('bundlePlugin')) } diff --git a/plugins/examples/custom-processor/build.gradle b/plugins/examples/custom-processor/build.gradle index 6c0281d899a4..9358f4d4998a 100644 --- a/plugins/examples/custom-processor/build.gradle +++ b/plugins/examples/custom-processor/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'custom-processor' description = 'An example plugin showing how to register a custom ingest processor' classname ='org.elasticsearch.example.customprocessor.ExampleProcessorPlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/plugins/examples/custom-settings/build.gradle b/plugins/examples/custom-settings/build.gradle index 2774bf6e75c7..556cddc8efae 100644 --- a/plugins/examples/custom-settings/build.gradle +++ b/plugins/examples/custom-settings/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'custom-settings' description = 'An example plugin showing how to register custom settings' classname ='org.elasticsearch.example.customsettings.ExampleCustomSettingsPlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } testClusters.configureEach { diff --git a/plugins/examples/custom-significance-heuristic/build.gradle b/plugins/examples/custom-significance-heuristic/build.gradle index f2f0cefa6d6f..766bfa5014a5 100644 --- a/plugins/examples/custom-significance-heuristic/build.gradle +++ b/plugins/examples/custom-significance-heuristic/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'custom-significance-heuristic' description = 'An example plugin showing how to write and register a custom significance heuristic' classname ='org.elasticsearch.example.customsigheuristic.CustomSignificanceHeuristicPlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/plugins/examples/custom-suggester/build.gradle b/plugins/examples/custom-suggester/build.gradle index a1cf345f5e81..bc5877f79a3d 100644 --- a/plugins/examples/custom-suggester/build.gradle +++ b/plugins/examples/custom-suggester/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'custom-suggester' description = 'An example plugin showing how to write and register a custom suggester' classname ='org.elasticsearch.example.customsuggester.CustomSuggesterPlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } testClusters.configureEach { diff --git a/plugins/examples/gradle/wrapper/gradle-wrapper.properties b/plugins/examples/gradle/wrapper/gradle-wrapper.properties index b8cea9f02a5b..2a6e21b2ba89 100644 --- a/plugins/examples/gradle/wrapper/gradle-wrapper.properties +++ b/plugins/examples/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip +distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/plugins/examples/painless-whitelist/build.gradle b/plugins/examples/painless-whitelist/build.gradle index f501bd466ebe..2b0df5c710a5 100644 --- a/plugins/examples/painless-whitelist/build.gradle +++ b/plugins/examples/painless-whitelist/build.gradle @@ -14,8 +14,8 @@ esplugin { description = 'An example whitelisting additional classes and methods in painless' classname ='org.elasticsearch.example.painlesswhitelist.MyWhitelistPlugin' extendedPlugins = ['lang-painless'] - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/plugins/examples/rescore/build.gradle b/plugins/examples/rescore/build.gradle index 023033349dd8..4b39befb1dfd 100644 --- a/plugins/examples/rescore/build.gradle +++ b/plugins/examples/rescore/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'example-rescore' description = 'An example plugin implementing rescore and verifying that plugins *can* implement rescore' classname ='org.elasticsearch.example.rescore.ExampleRescorePlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/plugins/examples/rest-handler/build.gradle b/plugins/examples/rest-handler/build.gradle index 43590b166a54..872edf00617f 100644 --- a/plugins/examples/rest-handler/build.gradle +++ b/plugins/examples/rest-handler/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'rest-handler' description = 'An example plugin showing how to register a REST handler' classname ='org.elasticsearch.example.resthandler.ExampleRestHandlerPlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/plugins/examples/script-expert-scoring/build.gradle b/plugins/examples/script-expert-scoring/build.gradle index 0fb1baaea2f0..159129872176 100644 --- a/plugins/examples/script-expert-scoring/build.gradle +++ b/plugins/examples/script-expert-scoring/build.gradle @@ -13,8 +13,8 @@ esplugin { name = 'script-expert-scoring' description = 'An example script engine to use low level Lucene internals for expert scoring' classname ='org.elasticsearch.example.expertscript.ExpertScriptPlugin' - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/plugins/examples/security-authorization-engine/build.gradle b/plugins/examples/security-authorization-engine/build.gradle index faf32774a20a..ea147cb730c5 100644 --- a/plugins/examples/security-authorization-engine/build.gradle +++ b/plugins/examples/security-authorization-engine/build.gradle @@ -6,8 +6,8 @@ esplugin { description = 'An example spi extension plugin for security that implements an Authorization Engine' classname ='org.elasticsearch.example.AuthorizationEnginePlugin' extendedPlugins = ['x-pack-security'] - licenseFile = rootProject.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } dependencies { diff --git a/qa/lucene-index-compatibility/build.gradle b/qa/lucene-index-compatibility/build.gradle index 3b2e69ec9859..50ecc66f1cc5 100644 --- a/qa/lucene-index-compatibility/build.gradle +++ b/qa/lucene-index-compatibility/build.gradle @@ -16,7 +16,7 @@ buildParams.bwcVersions.withLatestReadOnlyIndexCompatible { bwcVersion -> usesBwcDistribution(bwcVersion) // Tests rely on unreleased code in 8.18 branch - enabled = buildParams.isSnapshotBuild() + enabled = buildParams.snapshotBuild } } diff --git a/qa/system-indices/build.gradle b/qa/system-indices/build.gradle index c619d4f02e52..cbd7da37b49f 100644 --- a/qa/system-indices/build.gradle +++ b/qa/system-indices/build.gradle @@ -14,8 +14,8 @@ esplugin { name = 'system-indices-qa' description = 'Plugin for performing QA of system indices' classname ='org.elasticsearch.system.indices.SystemIndicesQA' - licenseFile = rootProject.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } testClusters.configureEach { diff --git a/qa/verify-version-constants/build.gradle b/qa/verify-version-constants/build.gradle index 67fc962e087c..c5f8fcabbda2 100644 --- a/qa/verify-version-constants/build.gradle +++ b/qa/verify-version-constants/build.gradle @@ -38,7 +38,7 @@ buildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName -> tasks.register("verifyDocsLuceneVersion") { doFirst { - File docsVersionsFile = rootProject.file('docs/Versions.asciidoc') + File docsVersionsFile = layout.settingsDirectory.file('docs/Versions.asciidoc').asFile List versionLines = docsVersionsFile.readLines('UTF-8') String docsLuceneVersion = null for (String line : versionLines) { diff --git a/rest-api-spec/build.gradle b/rest-api-spec/build.gradle index 1f5de727fbc0..0d598016facf 100644 --- a/rest-api-spec/build.gradle +++ b/rest-api-spec/build.gradle @@ -14,7 +14,7 @@ restResources { // REST API specifications are published under the Apache 2.0 License ext.projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')]) -licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt')) +licenseFile.set(layout.settingsDirectory.file('licenses/APACHE-LICENSE-2.0.txt').asFile) configurations { // configuration to make use by external yaml rest test plugin in our examples diff --git a/server/build.gradle b/server/build.gradle index 4b952a60b8b5..8bed775e4efb 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -131,7 +131,7 @@ def generatePluginsList = tasks.register("generatePluginsList") { sourceSets.main.output.dir(generatedResourcesDir) sourceSets.main.compiledBy(generateModulesList, generatePluginsList) -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' systemProperty 'es.failure_store_feature_flag_enabled', 'true' diff --git a/test/external-modules/apm-integration/build.gradle b/test/external-modules/apm-integration/build.gradle index 4a5d6d9d6d91..63e149490a9a 100644 --- a/test/external-modules/apm-integration/build.gradle +++ b/test/external-modules/apm-integration/build.gradle @@ -25,7 +25,7 @@ tasks.named("test").configure { } tasks.named('javaRestTest').configure { - it.onlyIf("snapshot build") { buildParams.isSnapshotBuild() } + it.onlyIf("snapshot build") { buildParams.snapshotBuild } } dependencies { diff --git a/test/external-modules/build.gradle b/test/external-modules/build.gradle index 47b909dbd708..dfdc47d9f5be 100644 --- a/test/external-modules/build.gradle +++ b/test/external-modules/build.gradle @@ -12,7 +12,7 @@ subprojects { esplugin { name = it.name - licenseFile = rootProject.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt') - noticeFile = rootProject.file('NOTICE.txt') + licenseFile = layout.settingsDirectory.file('licenses/AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt').asFile + noticeFile = layout.settingsDirectory.file('NOTICE.txt').asFile } } diff --git a/test/external-modules/delayed-aggs/build.gradle b/test/external-modules/delayed-aggs/build.gradle index 5d1291c8ee50..09fe28a45904 100644 --- a/test/external-modules/delayed-aggs/build.gradle +++ b/test/external-modules/delayed-aggs/build.gradle @@ -10,7 +10,7 @@ apply plugin: 'elasticsearch.legacy-yaml-rest-test' tasks.named('yamlRestTest').configure { - it.onlyIf("snapshot build") { buildParams.isSnapshotBuild() } + it.onlyIf("snapshot build") { buildParams.snapshotBuild } } esplugin { diff --git a/test/external-modules/die-with-dignity/build.gradle b/test/external-modules/die-with-dignity/build.gradle index a6622997bf5d..dbe3c1579b70 100644 --- a/test/external-modules/die-with-dignity/build.gradle +++ b/test/external-modules/die-with-dignity/build.gradle @@ -25,5 +25,5 @@ tasks.named("test").configure { } tasks.named('javaRestTest').configure { - it.onlyIf("snapshot build") { buildParams.isSnapshotBuild() } + it.onlyIf("snapshot build") { buildParams.snapshotBuild } } diff --git a/test/external-modules/error-query/build.gradle b/test/external-modules/error-query/build.gradle index 8ac47c339f21..3131e9bde004 100644 --- a/test/external-modules/error-query/build.gradle +++ b/test/external-modules/error-query/build.gradle @@ -10,7 +10,7 @@ apply plugin: 'elasticsearch.legacy-yaml-rest-test' tasks.named('yamlRestTest').configure { - it.onlyIf("snapshot build") { buildParams.isSnapshotBuild() } + it.onlyIf("snapshot build") { buildParams.snapshotBuild } } esplugin { diff --git a/test/external-modules/esql-heap-attack/build.gradle b/test/external-modules/esql-heap-attack/build.gradle index fa8c43048a6d..e760f1bd067c 100644 --- a/test/external-modules/esql-heap-attack/build.gradle +++ b/test/external-modules/esql-heap-attack/build.gradle @@ -20,5 +20,5 @@ esplugin { tasks.named('javaRestTest') { usesDefaultDistribution() - it.onlyIf("snapshot build") { buildParams.isSnapshotBuild() } + it.onlyIf("snapshot build") { buildParams.snapshotBuild } } diff --git a/test/external-modules/jvm-crash/build.gradle b/test/external-modules/jvm-crash/build.gradle index bc1a96836889..cf67fdc786e2 100644 --- a/test/external-modules/jvm-crash/build.gradle +++ b/test/external-modules/jvm-crash/build.gradle @@ -20,5 +20,5 @@ esplugin { tasks.named('javaRestTest') { usesDefaultDistribution() - it.onlyIf("snapshot build") { buildParams.isSnapshotBuild() } + it.onlyIf("snapshot build") { buildParams.snapshotBuild } } diff --git a/x-pack/build.gradle b/x-pack/build.gradle index da21ffc829d0..b7f38b61a61a 100644 --- a/x-pack/build.gradle +++ b/x-pack/build.gradle @@ -26,7 +26,7 @@ subprojects { ext.xpackModule = { String moduleName -> ":x-pack:plugin:${moduleName}" } plugins.withType(PluginBuildPlugin).whenPluginAdded { - project.esplugin.licenseFile = rootProject.file('licenses/ELASTIC-LICENSE-2.0.txt') + project.esplugin.licenseFile = layout.settingsDirectory.file('licenses/ELASTIC-LICENSE-2.0.txt').asFile project.esplugin.noticeFile = xpackRootProject.file('NOTICE.txt') } @@ -40,7 +40,7 @@ subprojects { } project.pluginManager.withPlugin("elasticsearch.build") { - project.ext.licenseFile.set(rootProject.file('licenses/ELASTIC-LICENSE-2.0.txt')) + project.ext.licenseFile.set(layout.settingsDirectory.file('licenses/ELASTIC-LICENSE-2.0.txt').asFile) project.ext.noticeFile.set(xpackRootProject.file('NOTICE.txt')) } } diff --git a/x-pack/plugin/analytics/build.gradle b/x-pack/plugin/analytics/build.gradle index 7aaaaaf66864..b69e9f0ec3ec 100644 --- a/x-pack/plugin/analytics/build.gradle +++ b/x-pack/plugin/analytics/build.gradle @@ -31,7 +31,7 @@ dependencies { testImplementation(testArtifact(project(xpackModule('core')))) } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' } diff --git a/x-pack/plugin/build.gradle b/x-pack/plugin/build.gradle index 784eed9bf0fa..18a9286a8e3c 100644 --- a/x-pack/plugin/build.gradle +++ b/x-pack/plugin/build.gradle @@ -41,7 +41,7 @@ artifacts { def restTestBlacklist = [] // TODO: fix this rest test to not depend on a hardcoded port! restTestBlacklist.addAll(['getting_started/10_monitor_cluster_health/*']) -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { // these tests attempt to install basic/internal licenses signed against the dev/public.key // Since there is no infrastructure in place (anytime soon) to generate licenses using the production // private key, these tests are blacklisted in non-snapshot test runs diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index df830eb9462b..f9c408ba302e 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -99,12 +99,12 @@ tasks.named("processResources").configure { String licenseKey = providers.systemProperty("license.key").getOrNull() if (licenseKey != null) { println "Using provided license key from ${licenseKey}" - } else if (buildParams.isSnapshotBuild()) { + } else if (buildParams.snapshotBuild) { licenseKey = Paths.get(project.projectDir.path, 'snapshot.key') } else { throw new IllegalArgumentException('Property license.key must be set for release build') } - File licenseKeyFile = rootProject.file(licenseKey) + File licenseKeyFile = layout.settingsDirectory.file(licenseKey).asFile if (licenseKeyFile.exists() == false) { throw new IllegalArgumentException('license.key at specified path [' + licenseKey + '] does not exist') } @@ -161,7 +161,7 @@ testClusters.configureEach { systemProperty 'es.queryable_built_in_roles_enabled', 'false' } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.withType(Test).configureEach { systemProperty 'es.failure_store_feature_flag_enabled', 'true' } diff --git a/x-pack/plugin/eql/build.gradle b/x-pack/plugin/eql/build.gradle index 72ab7dabf0fc..dc6607d2f60a 100644 --- a/x-pack/plugin/eql/build.gradle +++ b/x-pack/plugin/eql/build.gradle @@ -38,7 +38,7 @@ dependencies { * Enable QA/rest integration tests for snapshot builds only * * TODO: Enable for all builds upon this feature release * ****************************************************************/ -if (buildParams.isSnapshotBuild()) { +if (buildParams.snapshotBuild) { addQaCheckDependencies(project) } diff --git a/x-pack/plugin/esql/build.gradle b/x-pack/plugin/esql/build.gradle index 99e19a98dd03..3337484c5c83 100644 --- a/x-pack/plugin/esql/build.gradle +++ b/x-pack/plugin/esql/build.gradle @@ -83,7 +83,7 @@ interface Injected { } tasks.named("test").configure { - if (buildParams.isCi() == false) { + if (buildParams.ci == false) { systemProperty 'generateDocs', true def injected = project.objects.newInstance(Injected) doFirst { @@ -153,7 +153,7 @@ tasks.named("test").configure { * Enable QA/rest integration tests for snapshot builds only * * TODO: Enable for all builds upon this feature release * ****************************************************************/ -if (buildParams.isSnapshotBuild()) { +if (buildParams.snapshotBuild) { addQaCheckDependencies(project) } diff --git a/x-pack/plugin/mapper-constant-keyword/build.gradle b/x-pack/plugin/mapper-constant-keyword/build.gradle index 165001694966..3304dfec82da 100644 --- a/x-pack/plugin/mapper-constant-keyword/build.gradle +++ b/x-pack/plugin/mapper-constant-keyword/build.gradle @@ -23,7 +23,7 @@ dependencies { compileOnly project(path: xpackModule('core')) } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.getSnapshotBuild() == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' } diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index 8373d9c6582e..db87c27d30d2 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -99,7 +99,7 @@ dependencies { } def mlCppVersion(){ - return (project.gradle.parent != null && buildParams.isSnapshotBuild() == false) ? + return (project.gradle.parent != null && buildParams.snapshotBuild == false) ? (project.version + "-SNAPSHOT") : project.version; } diff --git a/x-pack/plugin/spatial/build.gradle b/x-pack/plugin/spatial/build.gradle index 49af925c0a42..e009f5e6be0f 100644 --- a/x-pack/plugin/spatial/build.gradle +++ b/x-pack/plugin/spatial/build.gradle @@ -33,7 +33,7 @@ testClusters.configureEach { setting 'xpack.security.enabled', 'false' } -if (buildParams.isSnapshotBuild() == false) { +if (buildParams.snapshotBuild == false) { tasks.named("test").configure { systemProperty 'es.index_mode_feature_flag_registered', 'true' } diff --git a/x-pack/qa/core-rest-tests-with-security/build.gradle b/x-pack/qa/core-rest-tests-with-security/build.gradle index f85d6ba961e0..46d480889d24 100644 --- a/x-pack/qa/core-rest-tests-with-security/build.gradle +++ b/x-pack/qa/core-rest-tests-with-security/build.gradle @@ -33,7 +33,7 @@ tasks.named("yamlRestTest").configure { 'index/10_with_id/Index with ID', 'indices.get_alias/10_basic/Get alias against closed indices', ]; - if (buildParams.isSnapshotBuild() == false) { + if (buildParams.snapshotBuild == false) { blacklist += [ 'synonyms_privileges/10_synonyms_with_privileges/*', 'synonyms_privileges/20_synonyms_no_privileges/*' diff --git a/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle b/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle index a18b34bf4a12..40b03c035981 100644 --- a/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle +++ b/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle @@ -85,7 +85,7 @@ tasks.named("yamlRestTest").configure { '^reindex/90_remote/*', '^reindex/95_parent_join/Reindex from remote*' ]; - if (buildParams.isSnapshotBuild() == false) { + if (buildParams.snapshotBuild == false) { blacklist += []; } systemProperty 'tests.rest.blacklist', blacklist.join(',') diff --git a/x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle b/x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle index d37523a3130e..457a50f9d6b3 100644 --- a/x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle +++ b/x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle @@ -164,7 +164,7 @@ tasks.named("yamlRestTest").configure { '^transform/transforms_upgrade/*', '^voting_only_node/10_basic/*' ]; - if (buildParams.isSnapshotBuild() == false) { + if (buildParams.snapshotBuild == false) { blacklist += []; } systemProperty 'tests.rest.blacklist', blacklist.join(',')