Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void apply(Project project) {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void configureCompile(Project project) {
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 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void apply(Project project) {
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()),
Expand Down Expand Up @@ -365,7 +365,7 @@ static void createBuildBwcTask(
} 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void apply(Project project) {
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
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void apply(Project project) {
.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ public interface BuildParameterExtension {

String getTestSeed();

Boolean isCi();
Boolean getCi();

Integer getDefaultParallel();

Boolean isSnapshotBuild();
Boolean getSnapshotBuild();

BwcVersions getBwcVersions();

Provider<BwcVersions> getBwcVersionsProvider();

Random getRandom();

Boolean isGraalVmRuntime();
Boolean getGraalVmRuntime();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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> bwcVersions;
Expand Down Expand Up @@ -81,7 +81,7 @@ public DefaultBuildParameterExtension(
this.testSeed = testSeed;
this.isCi = isCi;
this.defaultParallel = defaultParallel;
this.isSnapshotBuild = isSnapshotBuild;
this.snapshotBuild = isSnapshotBuild;
this.bwcVersions = cache(providers, bwcVersions);
this.gitOrigin = gitOrigin;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ public String getTestSeed() {
}

@Override
public Boolean isCi() {
public Boolean getCi() {
return isCi;
}

Expand All @@ -193,8 +193,8 @@ public Integer getDefaultParallel() {
}

@Override
public Boolean isSnapshotBuild() {
return isSnapshotBuild;
public Boolean getSnapshotBuild() {
return snapshotBuild;
}

@Override
Expand All @@ -208,7 +208,7 @@ public Random getRandom() {
}

@Override
public Boolean isGraalVmRuntime() {
public Boolean getGraalVmRuntime() {
return runtimeJavaDetails.get().toLowerCase().contains("graalvm");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void apply(Project project) {
}

// Don't fail when all tests are ignored when running in CI
filter.setFailOnNoMatchingTests(buildParams.isCi() == false);
filter.setFailOnNoMatchingTests(buildParams.getCi() == false);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void apply(Project project) {
var buildParams = loadBuildParams(project).get();
NamedDomainObjectContainer<TestFixtureDeployment> 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)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void apply(Project project) {

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);
}
Expand Down
2 changes: 1 addition & 1 deletion client/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion client/sniffer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion client/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down Expand Up @@ -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 ')
Expand Down
6 changes: 3 additions & 3 deletions distribution/docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down Expand Up @@ -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' }
}
Expand Down Expand Up @@ -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') ?
Expand Down
4 changes: 2 additions & 2 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
}
Expand Down
3 changes: 3 additions & 0 deletions gradle/build.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
6 changes: 3 additions & 3 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,9 @@
<sha256 value="d694edd7bae3bc1a8e0dae2f5a22c479ff04d6b9bfcb0ab751a42f02e02d2100" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.netflix.nebula" name="gradle-ospackage-plugin" version="11.10.1">
<artifact name="gradle-ospackage-plugin-11.10.1.jar">
<sha256 value="8f1daf5885f1a8f6bcab00bf9b52cf484d87da7839e9bbd327a94af27df5dacc" origin="Generated by Gradle"/>
<component group="com.netflix.nebula" name="gradle-ospackage-plugin" version="11.11.1">
<artifact name="gradle-ospackage-plugin-11.11.1.jar">
<sha256 value="34027ac840adb81b80de43082ce335a6518875217a38ac0204d5a84dc669b7ac" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.netflix.nebula" name="nebula-gradle-interop" version="2.0.0">
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion libs/h3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion libs/tdigest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion modules/aggregations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion modules/data-streams/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion modules/legacy-geo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/analysis-icu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
Loading