You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2020/04/20 20:55:54 UTC

[kafka] branch trunk updated: MINOR: Upgrade gradle plugins and test libraries for Java 14 support (#8519)

This is an automated email from the ASF dual-hosted git repository.

ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 065415e  MINOR: Upgrade gradle plugins and test libraries for Java 14 support (#8519)
065415e is described below

commit 065415e5244b7ca3a01c3840a55be8b41222c1a5
Author: Ismael Juma <is...@juma.me.uk>
AuthorDate: Mon Apr 20 13:55:20 2020 -0700

    MINOR: Upgrade gradle plugins and test libraries for Java 14 support (#8519)
    
    Also:
    * Remove deprecated `=` in resolutionStrategy.
    * Replace `AES/GCM/PKCS5Padding` with `AES/GCM/NoPadding`
    in `PasswordEncoderTest`. The former is invalid and JDK 14 rejects it,
    see https://bugs.openjdk.java.net/browse/JDK-8229043.
    
    With these changes, the build works with Java 14 and Scala 2.12. The
    same will apply to Scala 2.13 when Scala 2.13.2 is released (should
    happen within 1-2 weeks).
    
    Reviewers: Manikumar Reddy <ma...@gmail.com>, Matthias J. Sax <ma...@confluent.io>
---
 build.gradle                                           |  6 +++---
 .../scala/unit/kafka/utils/PasswordEncoderTest.scala   |  2 +-
 gradle/dependencies.gradle                             | 18 +++++++++---------
 jenkins.sh                                             |  7 ++++++-
 4 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/build.gradle b/build.gradle
index 2a0f199..7675b81 100644
--- a/build.gradle
+++ b/build.gradle
@@ -36,7 +36,7 @@ buildscript {
     classpath "com.github.jengelman.gradle.plugins:shadow:$versions.shadowPlugin"
     classpath "org.owasp:dependency-check-gradle:$versions.owaspDepCheckPlugin"
     classpath "com.diffplug.spotless:spotless-plugin-gradle:$versions.spotlessPlugin"
-    classpath "com.github.spotbugs:spotbugs-gradle-plugin:$versions.spotbugsPlugin"
+    classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:$versions.spotbugsPlugin"
     classpath "org.gradle:test-retry-gradle-plugin:$versions.testRetryPlugin"
   }
 }
@@ -62,7 +62,7 @@ allprojects {
 
   dependencyUpdates {
     revision="release"
-    resolutionStrategy = {
+    resolutionStrategy {
       componentSelection { rules ->
         rules.all { ComponentSelection selection ->
           boolean rejected = ['snap', 'alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
@@ -524,7 +524,7 @@ subprojects {
   }
   test.dependsOn('spotbugsMain')
 
-  tasks.withType(com.github.spotbugs.SpotBugsTask) {
+  tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
     reports {
       // Continue supporting `xmlFindBugsReport` for compatibility
       xml.enabled(project.hasProperty('xmlSpotBugsReport') || project.hasProperty('xmlFindBugsReport'))
diff --git a/core/src/test/scala/unit/kafka/utils/PasswordEncoderTest.scala b/core/src/test/scala/unit/kafka/utils/PasswordEncoderTest.scala
index 13d0c0b..e24a518 100755
--- a/core/src/test/scala/unit/kafka/utils/PasswordEncoderTest.scala
+++ b/core/src/test/scala/unit/kafka/utils/PasswordEncoderTest.scala
@@ -108,7 +108,7 @@ class PasswordEncoderTest {
     verifyEncodeDecode(keyFactoryAlg = None, "AES/CFB/PKCS5Padding", keyLength = 128)
     verifyEncodeDecode(keyFactoryAlg = None, "AES/OFB/PKCS5Padding", keyLength = 128)
     verifyEncodeDecode(keyFactoryAlg = Some("PBKDF2WithHmacSHA1"), Defaults.PasswordEncoderCipherAlgorithm, keyLength = 128)
-    verifyEncodeDecode(keyFactoryAlg = None, "AES/GCM/PKCS5Padding", keyLength = 128)
+    verifyEncodeDecode(keyFactoryAlg = None, "AES/GCM/NoPadding", keyLength = 128)
     verifyEncodeDecode(keyFactoryAlg = Some("PBKDF2WithHmacSHA256"), Defaults.PasswordEncoderCipherAlgorithm, keyLength = 128)
     verifyEncodeDecode(keyFactoryAlg = Some("PBKDF2WithHmacSHA512"), Defaults.PasswordEncoderCipherAlgorithm, keyLength = 128)
   }
diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
index e16a1fe..67d85d6 100644
--- a/gradle/dependencies.gradle
+++ b/gradle/dependencies.gradle
@@ -65,9 +65,9 @@ versions += [
   gradleVersionsPlugin: "0.28.0",
   grgit: "4.0.1",
   httpclient: "4.5.11",
-  easymock: "4.1",
+  easymock: "4.2",
   jackson: "2.10.2",
-  jacoco: "0.8.3",
+  jacoco: "0.8.5",
   // 9.4.25 renamed closeOutput to completeOutput (https://github.com/eclipse/jetty.project/commit/c5acf965067478784b54e2d241ec58fdb0b2c9fe)
   // which is a method used by recent Jersey versions when this comment was written (2.30.1 was the latest). Please
   // verify that this is fixed in some way before bumping the Jetty version.
@@ -97,9 +97,9 @@ versions += [
   lz4: "1.7.1",
   mavenArtifact: "3.6.3",
   metrics: "2.2.0",
-  mockito: "3.2.4",
-  owaspDepCheckPlugin: "5.2.4",
-  powermock: "2.0.5",
+  mockito: "3.3.3",
+  owaspDepCheckPlugin: "5.3.2.1",
+  powermock: "2.0.7",
   reflections: "0.9.12",
   rocksDB: "5.18.4",
   scalaCollectionCompat: "2.1.4",
@@ -111,10 +111,10 @@ versions += [
   shadowPlugin: "5.2.0",
   slf4j: "1.7.30",
   snappy: "1.1.7.3",
-  spotbugs: "3.1.12",
-  spotbugsPlugin: "3.0.0",
-  spotlessPlugin: "3.27.1",
-  testRetryPlugin: "1.1.0",
+  spotbugs: "4.0.2",
+  spotbugsPlugin: "4.0.5",
+  spotlessPlugin: "3.28.1",
+  testRetryPlugin: "1.1.5",
   zinc: "1.3.5",
   zookeeper: "3.5.7",
   zstd: "1.4.4-7"
diff --git a/jenkins.sh b/jenkins.sh
index 6f94134..b76128b 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -29,12 +29,17 @@
     --profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \
     || { echo 'Test steps failed'; exit 1; }
 
-# Verify that Kafka Streams archetype compiles
 if [ $JAVA_HOME = "/home/jenkins/tools/java/latest11" ] ; then
   echo "Skipping Kafka Streams archetype test for Java 11"
   exit 0
 fi
 
+if [ $JAVA_HOME = "/home/jenkins/tools/java/latest14" ] ; then
+  echo "Skipping Kafka Streams archetype test for Java 14"
+  exit 0
+fi
+
+# Verify that Kafka Streams archetype compiles
 ./gradlew streams:install clients:install connect:json:install connect:api:install \
     || { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; }