Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ecb223d

Browse files
authoredMar 22, 2023
Update gradle (GoogleCloudPlatform#211)
* Update shadow-plugin API to be compatible with gradle v8 * Update gradle wrapper to gradle 8.0.2 * Update GoogleCloudBuild images to use gradle v8
1 parent 4b716ee commit ecb223d

9 files changed

+17
-11
lines changed
 

‎cloudbuild-e2e-cloud-functions-gen2.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
steps:
1616
# Generate shadowJar for the instrumented test server
17-
- name: "gradle:7.5.1-jdk11"
17+
- name: "gradle:8.0.2-jdk11"
1818
id: generate-jar
1919
entrypoint: "gradle"
2020
timeout: 4m

‎e2e.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515

1616
# Build relative to root of repository i.e. `docker build --file e2e.Dockerfile --tag=$tag ..`
17-
FROM gradle:7.5.1-jdk11 as builder
17+
FROM gradle:8.0.2-jdk11 as builder
1818

1919
COPY --chown=gradle:gradle . /app/src
2020
WORKDIR /app/src

‎exporters/auto/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ dependencies {
4242
}
4343

4444

45-
shadowJar{
46-
classifier = null
45+
shadowJar {
46+
archiveClassifier.set('shaded')
4747
mergeServiceFiles()
4848
}
4949

‎gradle/wrapper/gradle-wrapper.jar

852 Bytes
Binary file not shown.
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

‎gradlew

+8-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac

‎gradlew.bat

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

‎settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pluginManagement {
1717
plugins {
1818
id "com.diffplug.spotless" version "5.9.0"
1919
id 'nebula.release' version '15.2.0'
20-
id "com.github.johnrengelman.shadow" version "7.1.2"
20+
id "com.github.johnrengelman.shadow" version "8.1.1"
2121
id 'com.google.cloud.tools.jib' version '3.1.4'
2222
}
2323
}

‎shared/resourcemapping/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies {
3232
}
3333

3434
shadowJar{
35-
classifier = null
35+
archiveClassifier.set('')
3636
relocate 'io.opentelemetry.semconv', 'com.google.cloud.opentelemetry.shadow.semconv'
3737
dependencies {
3838
exclude(dependency(libraries.opentelemetry_api))

0 commit comments

Comments
 (0)
Please sign in to comment.