From 4b3e9f9a2358ebfbc67e5228c85fa9738ce9860e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 03:13:48 +0000 Subject: [PATCH 1/9] Bump io.opentelemetry.instrumentation:gradle-plugins Bumps [io.opentelemetry.instrumentation:gradle-plugins](https://github.com/open-telemetry/opentelemetry-java-instrumentation) from 2.19.0-alpha to 2.26.1-alpha. - [Release notes](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-java-instrumentation/commits) --- updated-dependencies: - dependency-name: io.opentelemetry.instrumentation:gradle-plugins dependency-version: 2.26.1-alpha dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- buildSrc/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index cd31a2fc51..f3cce47e36 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -36,7 +36,7 @@ dependencies { implementation("org.owasp:dependency-check-gradle:12.2.0") - implementation("io.opentelemetry.instrumentation:gradle-plugins:2.19.0-alpha") + implementation("io.opentelemetry.instrumentation:gradle-plugins:2.26.1-alpha") implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.3.0") implementation("net.ltgt.gradle:gradle-nullaway-plugin:3.0.0") From 46aa6555fc0fb9c60fa617a84ed8867c517c3822 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Tue, 24 Mar 2026 00:24:40 -0700 Subject: [PATCH 2/9] chore(build): fix Shadow 9 migration by aligning plugin versions and centralizing META-INF duplicate policy Upgraded com.gradleup.shadow:shadow-gradle-plugin version to 9.3.2 to be in sync with io.opentelemetry.instrumentation:gradle-plugins:2.26.1-alpha. --- buildSrc/build.gradle.kts | 2 +- .../kotlin/ai.shadow-conventions.gradle.kts | 21 ++++++++++++++++++- .../main/kotlin/ai.smoke-test-jar.gradle.kts | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index f3cce47e36..06dad191a1 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -32,7 +32,7 @@ dependencies { // When updating, update above in plugins too implementation("com.diffplug.spotless:spotless-plugin-gradle:8.2.1") implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.4.8") - implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.9") + implementation("com.gradleup.shadow:shadow-gradle-plugin:9.3.2") implementation("org.owasp:dependency-check-gradle:12.2.0") diff --git a/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts b/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts index 35f12ccf56..8985a9694b 100644 --- a/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts @@ -6,10 +6,29 @@ plugins { tasks.withType().configureEach { mergeServiceFiles { - include("inst/META-INF/services/*") + include("META-INF/services/**") + include("inst/META-INF/services/**") } exclude("**/module-info.class") + exclude("META-INF/*.SF") + exclude("META-INF/*.DSA") + exclude("META-INF/*.RSA") + exclude("META-INF/maven/**") + exclude("META-INF/INDEX.LIST") + + // Keep service loaders merged while deduplicating non-functional META-INF metadata. + eachFile { + if (path.startsWith("META-INF/") && !path.startsWith("META-INF/services/")) { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + } + } + filesMatching("META-INF/services/**") { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + } + filesMatching("inst/META-INF/services/**") { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + } // Prevents conflict with other SLF4J instances. Important for premain. relocate("org.slf4j", "io.opentelemetry.javaagent.slf4j") diff --git a/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts b/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts index c4ea2e69dd..d86c9dc832 100644 --- a/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts +++ b/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts @@ -21,7 +21,7 @@ tasks.named("shadowJar") { // Use PropertiesFileTransformer to merge duplicate keys instead of simple append transform(PropertiesFileTransformer::class.java) { paths = listOf("META-INF/spring.factories") - mergeStrategy = "append" + mergeStrategy = PropertiesFileTransformer.MergeStrategy.Append } // Set main class - can be overridden by individual projects via mainClassName property From 4d1f6b2014269ce37fd806cfeba4a8f39667ff27 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Tue, 24 Mar 2026 12:53:58 -0700 Subject: [PATCH 3/9] fix(buildSrc): restore agent SPI service discovery after gradle-plugins upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shadow service-file merging was incomplete for isolated agent classes, so metric exporter providers were not discoverable from the inst service path during instrumentation tests. That caused Javaagent startup failures (otel.metrics.exporter=otlp “exporter not found”) and cascaded test failures across methods, micrometer, azure-functions, and applicationinsights-web modules. Update shadow conventions to merge service descriptors into both META-INF/services and inst/META-INF/services, restoring provider loading for the agent classloader and passing unit tests. --- buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts b/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts index 8985a9694b..c09a2528c3 100644 --- a/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/ai.shadow-conventions.gradle.kts @@ -5,10 +5,8 @@ plugins { } tasks.withType().configureEach { - mergeServiceFiles { - include("META-INF/services/**") - include("inst/META-INF/services/**") - } + mergeServiceFiles() + mergeServiceFiles("inst/META-INF/services") exclude("**/module-info.class") exclude("META-INF/*.SF") From f4874ab12062df7b8d93e664e2c2e84dc32068c6 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Tue, 24 Mar 2026 15:19:13 -0700 Subject: [PATCH 4/9] fix(buildSrc): merge spring.factories safely in smoke test fat jars Use Shadow AppendingTransformer with an explicit newline separator and include duplicate spring.factories inputs so all Spring Boot auto-configuration entries are preserved and properly delimited during merge. This prevents malformed merged META-INF/spring.factories content that broke smoke test app startup (e.g., missing servlet web server auto-config). --- .../src/main/kotlin/ai.smoke-test-jar.gradle.kts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts b/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts index d86c9dc832..7f651a617a 100644 --- a/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts +++ b/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts @@ -1,5 +1,5 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer +import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer import com.microsoft.applicationinsights.gradle.AiSmokeTestExtension plugins { @@ -15,13 +15,15 @@ val aiSmokeTest = extensions.getByType(AiSmokeTestExtension::class) tasks.named("shadowJar") { archiveClassifier.set("") mergeServiceFiles() + + filesMatching("META-INF/spring.factories") { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + } - // Properly merge spring.factories files from all dependencies - // This is required for Spring Boot auto-configuration to work - // Use PropertiesFileTransformer to merge duplicate keys instead of simple append - transform(PropertiesFileTransformer::class.java) { - paths = listOf("META-INF/spring.factories") - mergeStrategy = PropertiesFileTransformer.MergeStrategy.Append + // Keep entries newline-delimited; malformed spring.factories breaks auto-configuration. + transform(AppendingTransformer::class.java) { + resource = "META-INF/spring.factories" + separator = "\n" } // Set main class - can be overridden by individual projects via mainClassName property From 8e7fcd93e7274c4d7951383558fe0cfec712cc2c Mon Sep 17 00:00:00 2001 From: Sean Li Date: Wed, 25 Mar 2026 11:42:35 -0700 Subject: [PATCH 5/9] ix(smoke-tests): restore spring.factories key-aware merge for Shadow fat jars SpringCloudStream smoke was failing because META-INF/spring.factories entries were appended as plain text, causing auto-configuration keys to be effectively overwritten. Switch back to PropertiesFileTransformer merge behavior for spring.factories (with duplicate resources included), so Spring Cloud Stream binder auto-config is preserved. Validated by passing SpringCloudStream Java21 smoke and focused regression checks. --- .../src/main/kotlin/ai.smoke-test-jar.gradle.kts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts b/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts index 7f651a617a..41f26020ba 100644 --- a/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts +++ b/buildSrc/src/main/kotlin/ai.smoke-test-jar.gradle.kts @@ -1,5 +1,5 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer +import com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer import com.microsoft.applicationinsights.gradle.AiSmokeTestExtension plugins { @@ -19,11 +19,13 @@ tasks.named("shadowJar") { filesMatching("META-INF/spring.factories") { duplicatesStrategy = DuplicatesStrategy.INCLUDE } - - // Keep entries newline-delimited; malformed spring.factories breaks auto-configuration. - transform(AppendingTransformer::class.java) { - resource = "META-INF/spring.factories" - separator = "\n" + + // Properly merge spring.factories files from all dependencies + // This is required for Spring Boot auto-configuration to work + // Use PropertiesFileTransformer to merge duplicate keys instead of simple append + transform(PropertiesFileTransformer::class.java) { + paths = listOf("META-INF/spring.factories") + mergeStrategy = PropertiesFileTransformer.MergeStrategy.Append } // Set main class - can be overridden by individual projects via mainClassName property From 94ef8fbb8a0208aadfdb3730b6090060d85a45dc Mon Sep 17 00:00:00 2001 From: Sean Li Date: Wed, 25 Mar 2026 14:11:05 -0700 Subject: [PATCH 6/9] fix: prevent Shadow 9 from relocating logback descriptor in ClassicSdk appender suppression The upgrade from Shadow 8 to Shadow 9 (via gradle-plugins 2.26.1-alpha) changed constant pool string scanning to be more aggressive. Shadow 9 now rewrites all UTF-8 string constants containing relocatable package names, not just class/type references. This caused the literal "(Lch/qos/logback/classic/spi/ILoggingEvent;)V" inside ApplicationInsightsAppenderClassVisitor to be relocated to a shadowed package path, so the descriptor check in visitMethod() never matched the actual user class. This left the Classic SDK logback appender running unsuppressed, producing duplicate MessageData (SourceType "LOGBack" alongside "Logger"). Replace the exact descriptor equality checks with a generic signature pattern match on the append method. This is safe because transform() already gates on the exact appender class name via UnshadedSdkPackageName. --- .../ApplicationInsightsAppenderClassFileTransformer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java index 140cb8cccf..526c56b32c 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java @@ -72,10 +72,12 @@ public MethodVisitor visitMethod( @Nullable String signature, @Nullable String[] exceptions) { MethodVisitor mv = cw.visitMethod(access, name, descriptor, signature, exceptions); + // match append(SomeLoggingEvent): the descriptor type-strings are not checked here + // because Shadow relocates the "ch/qos/logback" literal, breaking the match at runtime; + // class-name filtering in transform() already guarantees we are in the right class if (name.equals("append") - && (descriptor.equals("(Lch/qos/logback/classic/spi/ILoggingEvent;)V") - || descriptor.equals("(Lorg/apache/log4j/spi/LoggingEvent;)V") - || descriptor.equals("(Lorg/apache/logging/log4j/core/LogEvent;)V"))) { + && descriptor.startsWith("(L") + && descriptor.endsWith(";)V")) { // no-op the append() method mv.visitCode(); mv.visitInsn(RETURN); From 00b0c4f96a9333b5486db8839980432b4da8b5bb Mon Sep 17 00:00:00 2001 From: Sean Li Date: Wed, 25 Mar 2026 14:15:18 -0700 Subject: [PATCH 7/9] ./gradlew spotlessApply --- .../ApplicationInsightsAppenderClassFileTransformer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java index 526c56b32c..f86c467b21 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java @@ -75,9 +75,7 @@ public MethodVisitor visitMethod( // match append(SomeLoggingEvent): the descriptor type-strings are not checked here // because Shadow relocates the "ch/qos/logback" literal, breaking the match at runtime; // class-name filtering in transform() already guarantees we are in the right class - if (name.equals("append") - && descriptor.startsWith("(L") - && descriptor.endsWith(";)V")) { + if (name.equals("append") && descriptor.startsWith("(L") && descriptor.endsWith(";)V")) { // no-op the append() method mv.visitCode(); mv.visitInsn(RETURN); From cc49d40fd8979746fa04c02f61cb85ca5dc5db41 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 25 Mar 2026 16:34:13 -0700 Subject: [PATCH 8/9] More explicit fix --- ...nInsightsAppenderClassFileTransformer.java | 10 +- .../classicsdk/UnshadedSdkPackageName.java | 15 +- gradlew.bat | 186 +++++++++--------- perf-tests/gradlew.bat | 186 +++++++++--------- 4 files changed, 203 insertions(+), 194 deletions(-) diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java index f86c467b21..02c245a862 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/ApplicationInsightsAppenderClassFileTransformer.java @@ -27,6 +27,8 @@ public class ApplicationInsightsAppenderClassFileTransformer implements ClassFil UnshadedSdkPackageName.get() + "/log4j/v2/ApplicationInsightsAppender"; private static final String UNSHADED_CLASS_NAME_LOG_4_JV_1_2 = UnshadedSdkPackageName.get() + "/log4j/v1_2/ApplicationInsightsAppender"; + private static final String UNSHADED_CLASS_NAME_LOGBACK_LOGGING_EVENT = + UnshadedSdkPackageName.getLogbackPrefix() + "logback/classic/spi/ILoggingEvent"; @Override @Nullable @@ -72,10 +74,10 @@ public MethodVisitor visitMethod( @Nullable String signature, @Nullable String[] exceptions) { MethodVisitor mv = cw.visitMethod(access, name, descriptor, signature, exceptions); - // match append(SomeLoggingEvent): the descriptor type-strings are not checked here - // because Shadow relocates the "ch/qos/logback" literal, breaking the match at runtime; - // class-name filtering in transform() already guarantees we are in the right class - if (name.equals("append") && descriptor.startsWith("(L") && descriptor.endsWith(";)V")) { + if (name.equals("append") + && (descriptor.equals("(L" + UNSHADED_CLASS_NAME_LOGBACK_LOGGING_EVENT + ";)V") + || descriptor.equals("(Lorg/apache/log4j/spi/LoggingEvent;)V") + || descriptor.equals("(Lorg/apache/logging/log4j/core/LogEvent;)V"))) { // no-op the append() method mv.visitCode(); mv.visitInsn(RETURN); diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/UnshadedSdkPackageName.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/UnshadedSdkPackageName.java index 8ecc5d7fed..c25fceb6aa 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/UnshadedSdkPackageName.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk/UnshadedSdkPackageName.java @@ -5,16 +5,23 @@ public class UnshadedSdkPackageName { - // using constant here so that it will NOT get shaded - // IMPORTANT FOR THIS NOT TO BE FINAL (or private) - // OTHERWISE COMPILER COULD THEORETICALLY INLINE IT BELOW AND APPLY .substring(1) - // and then it WOULD be shaded + // using package-prefix constants here so that they will NOT get shaded + // IMPORTANT FOR THESE NOT TO BE FINAL (or private) + // OTHERWISE COMPILER COULD THEORETICALLY INLINE THEM BELOW AND APPLY .substring(1) + // and then they WOULD be shaded @SuppressWarnings("ConstantField") // field value intentionally mutable for specific use case static String ALMOST_PREFIX = "!com/microsoft/applicationinsights"; + @SuppressWarnings("ConstantField") // field value intentionally mutable for specific use case + static String ALMOST_LOGBACK_PREFIX = "!ch/qos/"; + public static String get() { return ALMOST_PREFIX.substring(1); } + public static String getLogbackPrefix() { + return ALMOST_LOGBACK_PREFIX.substring(1); + } + private UnshadedSdkPackageName() {} } diff --git a/gradlew.bat b/gradlew.bat index e509b2dd8f..c4bdd3ab8e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,93 +1,93 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - - - -@rem Execute Gradle -"%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 -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%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 +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/perf-tests/gradlew.bat b/perf-tests/gradlew.bat index e509b2dd8f..c4bdd3ab8e 100755 --- a/perf-tests/gradlew.bat +++ b/perf-tests/gradlew.bat @@ -1,93 +1,93 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - - - -@rem Execute Gradle -"%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 -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%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 +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega From 9f3af1d8eafdfee930246ba5ddb7972b3da9bf9f Mon Sep 17 00:00:00 2001 From: Sean Li Date: Wed, 25 Mar 2026 19:03:10 -0700 Subject: [PATCH 9/9] revert accidental changes --- gradlew.bat | 186 ++++++++++++++++++++--------------------- perf-tests/gradlew.bat | 186 ++++++++++++++++++++--------------------- 2 files changed, 186 insertions(+), 186 deletions(-) diff --git a/gradlew.bat b/gradlew.bat index c4bdd3ab8e..e509b2dd8f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,93 +1,93 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - - - -@rem Execute Gradle -"%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 -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%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 +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/perf-tests/gradlew.bat b/perf-tests/gradlew.bat index c4bdd3ab8e..e509b2dd8f 100755 --- a/perf-tests/gradlew.bat +++ b/perf-tests/gradlew.bat @@ -1,93 +1,93 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - - - -@rem Execute Gradle -"%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 -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%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 +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega