kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject [kudu] branch master updated: [java] Upgrade to Gradle 6.2.2
Date Fri, 13 Mar 2020 19:06:15 GMT
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new c345305  [java] Upgrade to Gradle 6.2.2
c345305 is described below

commit c3453058d87ebf5672ddd9e1b7e333206e4812c7
Author: Grant Henke <granthenke@apache.org>
AuthorDate: Fri Mar 13 08:58:53 2020 -0500

    [java] Upgrade to Gradle 6.2.2
    
    This patch makes the major version upgrade to Gradle 6.2.2.
    I have been using this version without issue for quite some time
    and there are many performance and stability benefits.
    
    Some of the notable features are:
    - Stable Gradle build cache (similar to ccache for c++)
    - Stable parallel build execution
    - Improved dependency caching
    - JDK13 Support
    - Improved Scala incremental compilation
    - Signing Plugin now uses SHA512 instead of SHA1
    - Wrapper tries to recover from an invalid Gradle installation
    - Tons of fixed issues and performance improvements
    
    See the various release notes here for more:
    - https://docs.gradle.org/6.0/release-notes.html
    - https://docs.gradle.org/6.1/release-notes.html
    - https://docs.gradle.org/6.2/release-notes.html
    
    I enabled parallel builds by default, but would like to experiment
    more with build caching before enabling it by default.
    In the meantime you can use the build cache by adding
    `--build-cache` when calling Gradle.
    
    While upgrading Gradle I also upgraded the plugins to their latest
    versions.
    
    Change-Id: I93b6893500a0502c05d97468c267fb36c61b4918
    Reviewed-on: http://gerrit.cloudera.org:8080/15430
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <adar@cloudera.com>
---
 java/buildSrc/build.gradle                    |  6 +++---
 java/gradle.properties                        | 16 ++++++++++------
 java/gradle/dependencies.gradle               |  2 +-
 java/gradle/quality.gradle                    |  2 +-
 java/gradle/wrapper/gradle-wrapper.properties |  2 +-
 java/gradlew                                  |  2 +-
 java/kudu-backup-tools/build.gradle           |  2 +-
 java/kudu-spark/build.gradle                  |  2 +-
 8 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/java/buildSrc/build.gradle b/java/buildSrc/build.gradle
index a4a9b01..c2aebd2 100644
--- a/java/buildSrc/build.gradle
+++ b/java/buildSrc/build.gradle
@@ -28,12 +28,12 @@ repositories {
 // Manage plugin dependencies since the plugin block can't be used in included build scripts
yet.
 // For more details see: https://docs.gradle.org/current/userguide/plugins.html#plugins_dsl_limitations
 dependencies {
-  compile "com.github.ben-manes:gradle-versions-plugin:0.27.0"
+  compile "com.github.ben-manes:gradle-versions-plugin:0.28.0"
   compile "com.github.jengelman.gradle.plugins:shadow:5.2.0"
   compile "gradle.plugin.com.google.gradle:osdetector-gradle-plugin:1.6.2"
-  compile "com.google.protobuf:protobuf-gradle-plugin:0.8.11"
+  compile "com.google.protobuf:protobuf-gradle-plugin:0.8.12"
   compile "com.netflix.nebula:nebula-clojure-plugin:9.4.0"
-  compile "com.github.spotbugs:spotbugs-gradle-plugin:3.0.0"
+  compile "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.0.2"
   compile "io.spring.gradle:propdeps-plugin:0.0.9.RELEASE"
   compile "net.ltgt.gradle:gradle-errorprone-plugin:1.1.1"
   compile "ru.vyarus:gradle-animalsniffer-plugin:1.5.0"
diff --git a/java/gradle.properties b/java/gradle.properties
index 277a706..95e615e 100755
--- a/java/gradle.properties
+++ b/java/gradle.properties
@@ -52,13 +52,11 @@ maxParallelForks = 1
 org.gradle.warning.mode = summary
 
 # Flags to speed up the gradle build.
+# https://guides.gradle.org/performance/
 # https://docs.gradle.org/current/userguide/build_environment.html
 org.gradle.daemon = true
-# The below configurations are experimental but a nice performance boost.
-# org.gradle.caching = true
-# org.gradle.configureondemand = true
-# org.gradle.parallel = true
-# org.gradle.workers.max = 4
+org.gradle.parallel = true
+#org.gradle.caching = true
 
 # The below parameters are used in the `gradle wrapper` to generate `gradlew`
 # and `gradle-wrapper.properties`
@@ -69,4 +67,10 @@ gradleDistUrlBase = https://services.gradle.org/distributions
 # github.com because github.com servers deprecated TLSv1/TLSv1.1 support some
 # time ago, so older versions of curl (built against OpenSSL library that
 # doesn't support TLSv1.2) would fail to fetch the jar.
-wrapperBaseUrl = https://raw.githubusercontent.com/gradle/gradle/v5.0.0/gradle/wrapper/
+# This jar doesn't change frequently and doesn't need to be updated to match
+# the Gradle version to function properly.
+wrapperBaseUrl = https://raw.githubusercontent.com/gradle/gradle/v6.2.2/gradle/wrapper
+
+# Increase the default Java heap size for the build to avoid OOM issues.
+# https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
+org.gradle.jvmargs=-Xmx1g -Dfile.encoding=UTF-8
diff --git a/java/gradle/dependencies.gradle b/java/gradle/dependencies.gradle
index 022a52b..b83fa9a 100755
--- a/java/gradle/dependencies.gradle
+++ b/java/gradle/dependencies.gradle
@@ -33,7 +33,7 @@ versions += [
     commonsIo      : "2.6",
     errorProne     : "2.3.3",
     errorProneJavac: "9+181-r4173-1",
-    gradle         : "5.6.4",
+    gradle         : "6.2.2",
     guava          : "28.2-jre",
     hadoop         : "3.2.1",
     hamcrest       : "2.2",
diff --git a/java/gradle/quality.gradle b/java/gradle/quality.gradle
index 44785b8..e113c33 100644
--- a/java/gradle/quality.gradle
+++ b/java/gradle/quality.gradle
@@ -50,7 +50,7 @@ spotbugs {
   excludeFilter = file("$rootProject.projectDir/config/spotbugs/excludeFilter.xml")
 }
 
-tasks.withType(com.github.spotbugs.SpotBugsTask) {
+tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
   reports {
     xml.enabled false
     html.enabled true
diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties
index 0ebb310..84a9066 100644
--- a/java/gradle/wrapper/gradle-wrapper.properties
+++ b/java/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/java/gradlew b/java/gradlew
index fa8f2d4..6ba4069 100755
--- a/java/gradlew
+++ b/java/gradlew
@@ -84,7 +84,7 @@ esac
 # Loop in case we encounter an error.
 for attempt in 1 2 3; do
   if [ ! -e $APP_HOME/gradle/wrapper/gradle-wrapper.jar ]; then
-    if ! curl -s -S --retry 3 -L -o "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" "https://raw.githubusercontent.com/gradle/gradle/v5.0.0/gradle/wrapper//gradle-wrapper.jar";
then
+    if ! curl -s -S --retry 3 -L -o "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" "https://raw.githubusercontent.com/gradle/gradle/v6.2.2/gradle/wrapper/gradle-wrapper.jar";
then
       rm -f "$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
       # Pause for a bit before looping in case the server throttled us.
       sleep 5
diff --git a/java/kudu-backup-tools/build.gradle b/java/kudu-backup-tools/build.gradle
index 4bf1021..2f5bd0c 100644
--- a/java/kudu-backup-tools/build.gradle
+++ b/java/kudu-backup-tools/build.gradle
@@ -43,7 +43,7 @@ javadoc {
   enabled = false
 }
 
-tasks.withType(com.github.spotbugs.SpotBugsTask) {
+tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
   // This class causes SpotBugs runtime errors, so we completely ignore it from analysis.
   classes = classes.filter { !it.path.contains("BaseTestKuduBackupCleaner") }
 }
\ No newline at end of file
diff --git a/java/kudu-spark/build.gradle b/java/kudu-spark/build.gradle
index 17992a5..c866a7c 100644
--- a/java/kudu-spark/build.gradle
+++ b/java/kudu-spark/build.gradle
@@ -40,7 +40,7 @@ dependencies {
 // Adjust the artifact name to include the spark and scala base versions.
 archivesBaseName = "kudu-spark${versions.sparkBase}_${versions.scalaBase}"
 
-tasks.withType(com.github.spotbugs.SpotBugsTask) {
+tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
   // This class causes SpotBugs runtime errors, so we completely ignore it from analysis.
   classes = classes.filter { !it.path.contains("SparkSQLTest") }
 }
\ No newline at end of file


Mime
View raw message