kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject [1/2] kudu git commit: [java] Fix gradle wrapper with 4.1
Date Mon, 21 Aug 2017 17:25:19 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 44a820bff -> 055425245


[java] Fix gradle wrapper with 4.1

Gradle doesn’t use trailing zeros with new minor versions
which broke the wrapper logic.

This fixes the version to remove the trailing zero and
adjusts the logic to generate the gradle-wrapper.jar url
(which does use a trailing zero).

Change-Id: I12daa60fafeeee3376cbb8662710bde3856472bb
Reviewed-on: http://gerrit.cloudera.org:8080/7726
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/b4cb9eaa
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/b4cb9eaa
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/b4cb9eaa

Branch: refs/heads/master
Commit: b4cb9eaa74411bee811b4b3d782b2dc1a9ed427d
Parents: 44a820b
Author: Grant Henke <granthenke@gmail.com>
Authored: Fri Aug 18 15:34:32 2017 -0500
Committer: Todd Lipcon <todd@apache.org>
Committed: Sat Aug 19 00:25:55 2017 +0000

----------------------------------------------------------------------
 java/gradle/dependencies.gradle               | 2 +-
 java/gradle/wrapper.gradle                    | 6 ++++--
 java/gradle/wrapper/gradle-wrapper.properties | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/b4cb9eaa/java/gradle/dependencies.gradle
----------------------------------------------------------------------
diff --git a/java/gradle/dependencies.gradle b/java/gradle/dependencies.gradle
index 3b54c43..626f9d3 100755
--- a/java/gradle/dependencies.gradle
+++ b/java/gradle/dependencies.gradle
@@ -34,7 +34,7 @@ versions += [
     commonsIo      : "2.5",
     findbugs       : "3.0.1",
     flume          : "1.7.0",
-    gradle         : "4.1.0",
+    gradle         : "4.1",
     guava          : "20.0",
     hadoop         : "2.8.1",
     hamcrest       : "1.3",

http://git-wip-us.apache.org/repos/asf/kudu/blob/b4cb9eaa/java/gradle/wrapper.gradle
----------------------------------------------------------------------
diff --git a/java/gradle/wrapper.gradle b/java/gradle/wrapper.gradle
index 1504308..a030569 100644
--- a/java/gradle/wrapper.gradle
+++ b/java/gradle/wrapper.gradle
@@ -30,9 +30,11 @@ task bootstrapWrapper() {
   // In the doLast block so this runs when the task is called and not during project configuration.
   doLast {
     def wrapperJarPath = "\$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
-    // Leverages the wrapper jar checked into the gradle project on github because the jar
isn't available elsewhere.
-    def wrapperJarUrl = "https://raw.githubusercontent.com/gradle/gradle/v${versions.gradle}/gradle/wrapper/gradle-wrapper.jar"
 
+    // Add a trailing zero to the version if needed.
+    def fullVersion = versions.gradle.count(".") == 1 ? "${versions.gradle}.0" : versions.gradle
+    // Leverages the wrapper jar checked into the gradle project on github because the jar
isn't available elsewhere.
+    def wrapperJarUrl = "https://raw.githubusercontent.com/gradle/gradle/v$fullVersion/gradle/wrapper/gradle-wrapper.jar"
 
     def boostrapString = """
       if [ ! -e $wrapperJarPath ]; then

http://git-wip-us.apache.org/repos/asf/kudu/blob/b4cb9eaa/java/gradle/wrapper/gradle-wrapper.properties
----------------------------------------------------------------------
diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties
index 8edd05c..f16d266 100644
--- a/java/gradle/wrapper/gradle-wrapper.properties
+++ b/java/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip


Mime
View raw message