Skip to content

Commit

Permalink
Update to to Gradle wrapper 7.5 (elastic#85141)
Browse files Browse the repository at this point in the history
This updates the gradle wrapper to a 7.5

Fixes elastic#85123
# Conflicts:
#	build-tools-internal/build.gradle
#	build-tools-internal/performance/elasticsearch-build-benchmark-part1.scenarios
#	build-tools-internal/performance/elasticsearch-build-benchmark-part2.scenarios
#	build-tools/src/main/java/org/elasticsearch/gradle/testclusters/StandaloneRestIntegTestTask.java
  • Loading branch information
breskeby committed Jul 19, 2022
1 parent 5e7df59 commit a09194c
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 17 deletions.
4 changes: 2 additions & 2 deletions build-tools-internal/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82
distributionSha256Sum=97a52d145762adc241bad7fd18289bf7f6801e08ece6badf80402fe2b9f250b1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package org.elasticsearch.gradle.internal.snyk
import org.elasticsearch.gradle.fixtures.AbstractGradleInternalPluginFuncTest
import org.gradle.api.Plugin
import org.gradle.testkit.runner.TaskOutcome
import org.gradle.util.GradleVersion
import org.skyscreamer.jsonassert.JSONAssert

import static java.net.HttpURLConnection.HTTP_CREATED
Expand Down Expand Up @@ -57,7 +58,7 @@ class SnykDependencyMonitoringGradlePluginFuncTest extends AbstractGradleInterna
},
"depGraphJSON": {
"pkgManager": {
"version": "7.4.2",
"version": "${GradleVersion.current().version}",
"name": "gradle"
},
"schemaVersion": "1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public void execute(Task task) {

project.getTasks().withType(Checkstyle.class).configureEach(t -> {
t.dependsOn(copyCheckstyleConf);
t.getMaxHeapSize().set("1g");
t.reports(r -> r.getHtml().getRequired().set(false));
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.2
7.5
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

public class UpdateShasTaskTests extends GradleUnitTestCase {

public static final String GROOVY_JAR_REGEX = "groovy-\\d\\.\\d+\\.\\d+\\.jar";
@Rule
public ExpectedException expectedException = ExpectedException.none();

Expand Down Expand Up @@ -66,7 +67,7 @@ public void whenDependencyExistsButShaNotThenShouldCreateNewShaFile() throws IOE
getLicensesDir(project).mkdir();
task.updateShas();
Path groovySha = Files.list(getLicensesDir(project).toPath())
.filter(p -> p.toFile().getName().matches("groovy-\\d\\.\\d\\.\\d\\.jar.sha1"))
.filter(p -> p.toFile().getName().matches(GROOVY_JAR_REGEX + ".sha1"))
.findFirst()
.get();
assertTrue(groovySha.toFile().getName().startsWith("groovy"));
Expand All @@ -79,7 +80,7 @@ public void whenDependencyAndWrongShaExistsThenShouldNotOverwriteShaFile() throw
.getDependencies()
.getFiles()
.stream()
.filter(f -> f.getName().matches("groovy-\\d\\.\\d\\.\\d\\.jar"))
.filter(f -> f.getName().matches(GROOVY_JAR_REGEX))
.findFirst()
.get();
String groovyShaName = groovyJar.getName() + ".sha1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public List<ResourceLock> getSharedResources() {

int nodeCount = clusters.stream().mapToInt(cluster -> cluster.getNodes().size()).sum();
if (nodeCount > 0) {
locks.add(resource.getResourceLock(Math.min(nodeCount, resource.getMaxUsages())));
locks.add(resource.getResourceLock());
}
return Collections.unmodifiableList(locks);
}
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,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82
distributionSha256Sum=97a52d145762adc241bad7fd18289bf7f6801e08ece6badf80402fe2b9f250b1
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
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!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
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
Expand Down
4 changes: 2 additions & 2 deletions plugins/examples/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82
distributionSha256Sum=97a52d145762adc241bad7fd18289bf7f6801e08ece6badf80402fe2b9f250b1
2 changes: 2 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,5 @@ tasks.named('splitPackagesAudit').configure {
'org.apache.lucene.geo.XTessellator'

}

tasks.withType(Checkstyle.class).configureEach { t -> t.getMaxHeapSize().set("2g") }

0 comments on commit a09194c

Please sign in to comment.