diff --git a/build-tools-internal/gradle/wrapper/gradle-wrapper.properties b/build-tools-internal/gradle/wrapper/gradle-wrapper.properties index 01450089d2c6c..6bf62392cf2d0 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=f759b8dd5204e2e3fa4ca3e73f452f087153cf81bac9561eeb854229cc2c5365 -distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-all.zip +distributionSha256Sum=b84e04fa845fecba48551f425957641074fcc00a88a84d2aae5808743b35fc85 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/ExtractCurrentVersionsTask.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/ExtractCurrentVersionsTask.java index 76d6aeeca6db9..599a82295fe30 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/ExtractCurrentVersionsTask.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/ExtractCurrentVersionsTask.java @@ -29,7 +29,7 @@ import javax.inject.Inject; -public class ExtractCurrentVersionsTask extends AbstractVersionsTask { +public abstract class ExtractCurrentVersionsTask extends AbstractVersionsTask { private static final Logger LOGGER = Logging.getLogger(ExtractCurrentVersionsTask.class); private Path outputFile; diff --git a/build-tools-internal/src/main/resources/minimumGradleVersion b/build-tools-internal/src/main/resources/minimumGradleVersion index c9277c5a601f8..e977f5eae6fc9 100644 --- a/build-tools-internal/src/main/resources/minimumGradleVersion +++ b/build-tools-internal/src/main/resources/minimumGradleVersion @@ -1 +1 @@ -9.0.0 \ No newline at end of file +9.1.0 \ No newline at end of file diff --git a/config.js b/config.js new file mode 100644 index 0000000000000..3dc4119ab208c --- /dev/null +++ b/config.js @@ -0,0 +1,37 @@ +const fs = require('fs') +const os = require('os') +const path = require('path') + +function retrieveDockerCredentials() { + try { + const dockerConfig = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.docker', 'config.json'))) + + const creds = Buffer.from(dockerConfig.auths['docker.elastic.co'].auth, 'base64').toString().split(':'); + if (creds) { + console.log("Found credentials for `docker.elastic.co`", { username: creds[0], passwordLength: creds[1].length }) + return creds + } + } catch (e) { + console.warn("Failed to retrieve local Docker credentials for `docker.elastic.co`. This is fine if you don't want to validate internal Docker images can be updated", { error: e }) + } +} + +const creds = retrieveDockerCredentials() + +const config = { +} + + +if (creds) { + config["hostRules"] = [ + { + hostType: 'docker', + matchHost: 'docker.elastic.co', + username: creds[0], + password: creds[1], + timeout: 10_000, + } + ] +} + +module.exports = config; diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index a92bda3c2b877..43df87344c2fd 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -4388,6 +4388,11 @@ + + + + + @@ -4398,6 +4403,11 @@ + + + + + @@ -4973,6 +4983,11 @@ + + + + + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55baabb5..8bdaf60c75ab8 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 01450089d2c6c..6bf62392cf2d0 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=f759b8dd5204e2e3fa4ca3e73f452f087153cf81bac9561eeb854229cc2c5365 -distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-all.zip +distributionSha256Sum=b84e04fa845fecba48551f425957641074fcc00a88a84d2aae5808743b35fc85 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 23d15a9367071..adff685a0348c 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/gradlew.bat b/gradlew.bat index 5eed7ee845284..e509b2dd8fe55 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/plugins/examples/gradle/wrapper/gradle-wrapper.properties b/plugins/examples/gradle/wrapper/gradle-wrapper.properties index 01450089d2c6c..6bf62392cf2d0 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=f759b8dd5204e2e3fa4ca3e73f452f087153cf81bac9561eeb854229cc2c5365 -distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-all.zip +distributionSha256Sum=b84e04fa845fecba48551f425957641074fcc00a88a84d2aae5808743b35fc85 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index fd63fe2eabb05..1e4830117307c 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -111,7 +111,6 @@ def mlCppVersion(){ (project.version + "-SNAPSHOT") : project.version; } - tasks.named('assemble').configure { dependsOn tasks.named('jar') } diff --git a/x-pack/plugin/otel-data/build.gradle b/x-pack/plugin/otel-data/build.gradle index 3219444c753b9..1fa6a5a0d5567 100644 --- a/x-pack/plugin/otel-data/build.gradle +++ b/x-pack/plugin/otel-data/build.gradle @@ -6,14 +6,28 @@ */ import org.elasticsearch.gradle.transform.UnzipTransform import com.google.protobuf.gradle.GenerateProtoTask + +buildscript { + repositories { + maven { url = "https://jitpack.io" } + } + dependencies { + classpath 'com.github.google:protobuf-gradle-plugin:PR786-SNAPSHOT' + } +} + plugins { id 'elasticsearch.internal-es-plugin' id 'elasticsearch.internal-yaml-rest-test' id 'elasticsearch.internal-java-rest-test' id 'elasticsearch.internal-cluster-test' - id('com.google.protobuf') version '0.9.5' + // We rely on a snapshot including a fix for 9.1 compatibility. + // See https://github.com/google/protobuf-gradle-plugin/pull/786 + // id('com.google.protobuf') version '0.9.5' } +apply plugin:"com.google.protobuf" + esplugin { name = 'x-pack-otel-data' description = 'The OTEL plugin defines OTEL data streams and ingest pipelines.' diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 28d8892fc961e..e42ec82c5f8b4 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -167,7 +167,6 @@ tasks.named("processTestResources").configure { from(project(xpackModule('core')).file('src/test/resources')) } - tasks.named('assemble').configure { // normal es plugins do not publish the jar but we need to since users need it for extensions dependsOn tasks.named('jar')