Skip to content

Commit 6ed6fe8

Browse files
committed
Revert "build(gradle): version change (Gradle and shadow plugin) (#11999)"
This reverts commit 2291c71.
1 parent c2ae385 commit 6ed6fe8

File tree

14 files changed

+40
-58
lines changed

14 files changed

+40
-58
lines changed

build.gradle

+1-7
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ buildscript {
3434
// Releases: https://github.com/linkedin/rest.li/blob/master/CHANGELOG.md
3535
ext.pegasusVersion = '29.57.0'
3636
ext.mavenVersion = '3.6.3'
37-
ext.versionGradle = '8.11.1'
3837
ext.springVersion = '6.1.13'
3938
ext.springBootVersion = '3.2.9'
4039
ext.springKafkaVersion = '3.1.6'
@@ -79,7 +78,7 @@ buildscript {
7978

8079
plugins {
8180
id 'com.gorylenko.gradle-git-properties' version '2.4.1'
82-
id 'com.gradleup.shadow' version '8.3.5' apply false
81+
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
8382
id 'com.palantir.docker' version '0.35.0' apply false
8483
id 'com.avast.gradle.docker-compose' version '0.17.6'
8584
id "com.diffplug.spotless" version "6.23.3"
@@ -500,8 +499,3 @@ subprojects {
500499
}
501500
}
502501
}
503-
504-
wrapper {
505-
gradleVersion = project.versionGradle
506-
distributionType = Wrapper.DistributionType.ALL
507-
}

docs/plugins.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ The sample authenticator implementation can be found at [Authenticator Sample](.
6565
3. Use `getResourceAsStream` to read files: If your plugin read any configuration file like properties or YAML or JSON or xml then use `this.getClass().getClassLoader().getResourceAsStream("<file-name>")` to read that file from DataHub GMS plugin's class-path. For DataHub GMS resource look-up behavior please refer [Plugin Installation](#plugin-installation) section. Sample code of `getResourceAsStream` is available in sample Authenticator plugin [TestAuthenticator.java](../metadata-service/plugin/src/test/sample-test-plugins/src/main/java/com/datahub/plugins/test/TestAuthenticator.java).
6666

6767

68-
4. Bundle your Jar: Use `com.gradleup.shadow` gradle plugin to create an uber jar.
68+
4. Bundle your Jar: Use `com.github.johnrengelman.shadow` gradle plugin to create an uber jar.
6969

7070
To see an example of building an uber jar, check out the `build.gradle` file for the apache-ranger-plugin file of [Apache Ranger Plugin](https://github.com/acryldata/datahub-ranger-auth-plugin/tree/main/apache-ranger-plugin) for reference.
7171

7272
Exclude signature files as shown in below `shadowJar` task.
7373

7474
```groovy
75-
apply plugin: 'com.gradleup.shadow';
75+
apply plugin: 'com.github.johnrengelman.shadow';
7676
shadowJar {
7777
// Exclude com.datahub.plugins package and files related to jar signature
7878
exclude "META-INF/*.RSA", "META-INF/*.SF","META-INF/*.DSA"
@@ -152,14 +152,14 @@ The sample authorizer implementation can be found at [Authorizer Sample](https:/
152152

153153
3. Use `getResourceAsStream` to read files: If your plugin read any configuration file like properties or YAML or JSON or xml then use `this.getClass().getClassLoader().getResourceAsStream("<file-name>")` to read that file from DataHub GMS plugin's class-path. For DataHub GMS resource look-up behavior please refer [Plugin Installation](#plugin-installation) section. Sample code of `getResourceAsStream` is available in sample Authenticator plugin [TestAuthenticator.java](../metadata-service/plugin/src/test/sample-test-plugins/src/main/java/com/datahub/plugins/test/TestAuthenticator.java).
154154

155-
4. Bundle your Jar: Use `com.gradleup.shadow` gradle plugin to create an uber jar.
155+
4. Bundle your Jar: Use `com.github.johnrengelman.shadow` gradle plugin to create an uber jar.
156156

157157
To see an example of building an uber jar, check out the `build.gradle` file for the apache-ranger-plugin file of [Apache Ranger Plugin](https://github.com/acryldata/datahub-ranger-auth-plugin/tree/main/apache-ranger-plugin) for reference.
158158

159159
Exclude signature files as shown in below `shadowJar` task.
160160

161161
```groovy
162-
apply plugin: 'com.gradleup.shadow';
162+
apply plugin: 'com.github.johnrengelman.shadow';
163163
shadowJar {
164164
// Exclude com.datahub.plugins package and files related to jar signature
165165
exclude "META-INF/*.RSA", "META-INF/*.SF","META-INF/*.DSA"

gradle/wrapper/gradle-wrapper.jar

17.6 KB
Binary file not shown.
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
54
networkTimeout=10000
6-
validateDistributionUrl=true
75
zipStoreBase=GRADLE_USER_HOME
86
zipStorePath=wrapper/dists

gradlew

+13-21
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18-
# SPDX-License-Identifier: Apache-2.0
19-
#
2018

2119
##############################################################################
2220
#
@@ -57,7 +55,7 @@
5755
# Darwin, MinGW, and NonStop.
5856
#
5957
# (3) This script is generated from the Groovy template
60-
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/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
6159
# within the Gradle project.
6260
#
6361
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -85,9 +83,10 @@ done
8583
# This is normally unused
8684
# shellcheck disable=SC2034
8785
APP_BASE_NAME=${0##*/}
88-
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87+
88+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -134,29 +133,26 @@ location of your Java installation."
134133
fi
135134
else
136135
JAVACMD=java
137-
if ! command -v java >/dev/null 2>&1
138-
then
139-
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
136+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
140137
141138
Please set the JAVA_HOME variable in your environment to match the
142139
location of your Java installation."
143-
fi
144140
fi
145141

146142
# Increase the maximum file descriptors if we can.
147143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
148144
case $MAX_FD in #(
149145
max*)
150146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
151-
# shellcheck disable=SC2039,SC3045
147+
# shellcheck disable=SC3045
152148
MAX_FD=$( ulimit -H -n ) ||
153149
warn "Could not query maximum file descriptor limit"
154150
esac
155151
case $MAX_FD in #(
156152
'' | soft) :;; #(
157153
*)
158154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
159-
# shellcheck disable=SC2039,SC3045
155+
# shellcheck disable=SC3045
160156
ulimit -n "$MAX_FD" ||
161157
warn "Could not set maximum file descriptor limit to $MAX_FD"
162158
esac
@@ -201,15 +197,11 @@ if "$cygwin" || "$msys" ; then
201197
done
202198
fi
203199

204-
205-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207-
208-
# Collect all arguments for the java command:
209-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210-
# and any embedded shellness will be escaped.
211-
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212-
# treated as '${Hostname}' itself on the command line.
200+
# Collect all arguments for the java command;
201+
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202+
# shell script including quotes and variable substitutions, so put them in
203+
# double quotes to make sure that they get re-expanded; and
204+
# * put everything else in single quotes, so that it's not re-expanded.
213205

214206
set -- \
215207
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

+10-12
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16-
@rem SPDX-License-Identifier: Apache-2.0
17-
@rem
1816

1917
@if "%DEBUG%"=="" @echo off
2018
@rem ##########################################################################
@@ -45,11 +43,11 @@ set JAVA_EXE=java.exe
4543
%JAVA_EXE% -version >NUL 2>&1
4644
if %ERRORLEVEL% equ 0 goto execute
4745

48-
echo. 1>&2
49-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50-
echo. 1>&2
51-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52-
echo location of your Java installation. 1>&2
46+
echo.
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48+
echo.
49+
echo Please set the JAVA_HOME variable in your environment to match the
50+
echo location of your Java installation.
5351

5452
goto fail
5553

@@ -59,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5957

6058
if exist "%JAVA_EXE%" goto execute
6159

62-
echo. 1>&2
63-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64-
echo. 1>&2
65-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66-
echo location of your Java installation. 1>&2
60+
echo.
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62+
echo.
63+
echo Please set the JAVA_HOME variable in your environment to match the
64+
echo location of your Java installation.
6765

6866
goto fail
6967

metadata-auth/auth-api/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id("com.palantir.git-version") apply false
33
}
44

5-
apply plugin: 'com.gradleup.shadow'
5+
apply plugin: 'com.github.johnrengelman.shadow'
66
apply plugin: 'java-library'
77
apply plugin: 'signing'
88
apply plugin: 'maven-publish'

metadata-integration/java/acryl-spark-lineage/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id("com.palantir.git-version") apply false
33
}
44
apply plugin: 'java-library'
5-
apply plugin: 'com.gradleup.shadow'
5+
apply plugin: 'com.github.johnrengelman.shadow'
66
apply plugin: 'signing'
77
apply plugin: 'io.codearte.nexus-staging'
88
apply plugin: 'maven-publish'

metadata-integration/java/custom-plugin-lib/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java-library'
3-
id 'com.gradleup.shadow'
3+
id 'com.github.johnrengelman.shadow'
44
id 'signing'
55
id 'io.codearte.nexus-staging'
66
id 'maven-publish'

metadata-integration/java/datahub-client/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id("com.palantir.git-version") apply false
33
id 'java-library'
4-
id 'com.gradleup.shadow'
4+
id 'com.github.johnrengelman.shadow'
55
id 'signing'
66
id 'io.codearte.nexus-staging'
77
id 'maven-publish'
@@ -23,7 +23,7 @@ dependencies {
2323
api project(':entity-registry')
2424
api project(':metadata-integration:java:datahub-event')
2525
implementation project(':metadata-integration:java:datahub-schematron:lib')
26-
26+
2727
implementation(externalDependency.kafkaAvroSerializer) {
2828
exclude group: "org.apache.avro"
2929
}
@@ -70,14 +70,14 @@ task validatePythonEnv(dependsOn: [":metadata-ingestion:installDev"]) {
7070
def venvPath = System.getProperty('python.venv.path', '../../../metadata-ingestion/venv')
7171
def isWindows = System.getProperty('os.name').toLowerCase().contains('windows')
7272
def pythonExe = isWindows ? "${venvPath}/Scripts/python.exe" : "${venvPath}/bin/python"
73-
73+
7474
def result = exec {
7575
commandLine pythonExe, "-c", "import sys; print(sys.executable)"
7676
ignoreExitValue = true
7777
standardOutput = new ByteArrayOutputStream()
7878
errorOutput = new ByteArrayOutputStream()
7979
}
80-
80+
8181
if (result.exitValue != 0) {
8282
throw new GradleException("Python virtual environment not properly set up at ${venvPath}")
8383
}

metadata-integration/java/datahub-event/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id("com.palantir.git-version") apply false
33
id 'java'
4-
id 'com.gradleup.shadow'
4+
id 'com.github.johnrengelman.shadow'
55
id 'signing'
66
id 'io.codearte.nexus-staging'
77
id 'maven-publish'

metadata-integration/java/datahub-protobuf/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
id "application"
44
}
55
apply plugin: 'java'
6-
apply plugin: 'com.gradleup.shadow'
6+
apply plugin: 'com.github.johnrengelman.shadow'
77
apply plugin: 'signing'
88
apply plugin: 'io.codearte.nexus-staging'
99
apply plugin: 'maven-publish'

metadata-integration/java/openlineage-converter/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apply plugin: 'java-library'
2-
apply plugin: 'com.gradleup.shadow'
2+
apply plugin: 'com.github.johnrengelman.shadow'
33
apply plugin: 'signing'
44
apply plugin: 'maven-publish'
55
apply from: '../../../gradle/coverage/java-coverage.gradle'

metadata-integration/java/spark-lineage-legacy/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id("com.palantir.git-version") apply false
33
}
44
apply plugin: 'java'
5-
apply plugin: 'com.gradleup.shadow'
5+
apply plugin: 'com.github.johnrengelman.shadow'
66
apply plugin: 'signing'
77
apply plugin: 'io.codearte.nexus-staging'
88
apply plugin: 'maven-publish'

0 commit comments

Comments
 (0)