mirror of https://github.com/apache/kafka.git
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 <manikumar.reddy@gmail.com>, Matthias J. Sax <matthias@confluent.io>
This commit is contained in:
parent
fcf45e1fac
commit
065415e524
|
@ -36,7 +36,7 @@ buildscript {
|
||||||
classpath "com.github.jengelman.gradle.plugins:shadow:$versions.shadowPlugin"
|
classpath "com.github.jengelman.gradle.plugins:shadow:$versions.shadowPlugin"
|
||||||
classpath "org.owasp:dependency-check-gradle:$versions.owaspDepCheckPlugin"
|
classpath "org.owasp:dependency-check-gradle:$versions.owaspDepCheckPlugin"
|
||||||
classpath "com.diffplug.spotless:spotless-plugin-gradle:$versions.spotlessPlugin"
|
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"
|
classpath "org.gradle:test-retry-gradle-plugin:$versions.testRetryPlugin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ allprojects {
|
||||||
|
|
||||||
dependencyUpdates {
|
dependencyUpdates {
|
||||||
revision="release"
|
revision="release"
|
||||||
resolutionStrategy = {
|
resolutionStrategy {
|
||||||
componentSelection { rules ->
|
componentSelection { rules ->
|
||||||
rules.all { ComponentSelection selection ->
|
rules.all { ComponentSelection selection ->
|
||||||
boolean rejected = ['snap', 'alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
|
boolean rejected = ['snap', 'alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
|
||||||
|
@ -524,7 +524,7 @@ subprojects {
|
||||||
}
|
}
|
||||||
test.dependsOn('spotbugsMain')
|
test.dependsOn('spotbugsMain')
|
||||||
|
|
||||||
tasks.withType(com.github.spotbugs.SpotBugsTask) {
|
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
|
||||||
reports {
|
reports {
|
||||||
// Continue supporting `xmlFindBugsReport` for compatibility
|
// Continue supporting `xmlFindBugsReport` for compatibility
|
||||||
xml.enabled(project.hasProperty('xmlSpotBugsReport') || project.hasProperty('xmlFindBugsReport'))
|
xml.enabled(project.hasProperty('xmlSpotBugsReport') || project.hasProperty('xmlFindBugsReport'))
|
||||||
|
|
|
@ -108,7 +108,7 @@ class PasswordEncoderTest {
|
||||||
verifyEncodeDecode(keyFactoryAlg = None, "AES/CFB/PKCS5Padding", keyLength = 128)
|
verifyEncodeDecode(keyFactoryAlg = None, "AES/CFB/PKCS5Padding", keyLength = 128)
|
||||||
verifyEncodeDecode(keyFactoryAlg = None, "AES/OFB/PKCS5Padding", keyLength = 128)
|
verifyEncodeDecode(keyFactoryAlg = None, "AES/OFB/PKCS5Padding", keyLength = 128)
|
||||||
verifyEncodeDecode(keyFactoryAlg = Some("PBKDF2WithHmacSHA1"), Defaults.PasswordEncoderCipherAlgorithm, 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("PBKDF2WithHmacSHA256"), Defaults.PasswordEncoderCipherAlgorithm, keyLength = 128)
|
||||||
verifyEncodeDecode(keyFactoryAlg = Some("PBKDF2WithHmacSHA512"), Defaults.PasswordEncoderCipherAlgorithm, keyLength = 128)
|
verifyEncodeDecode(keyFactoryAlg = Some("PBKDF2WithHmacSHA512"), Defaults.PasswordEncoderCipherAlgorithm, keyLength = 128)
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,9 @@ versions += [
|
||||||
gradleVersionsPlugin: "0.28.0",
|
gradleVersionsPlugin: "0.28.0",
|
||||||
grgit: "4.0.1",
|
grgit: "4.0.1",
|
||||||
httpclient: "4.5.11",
|
httpclient: "4.5.11",
|
||||||
easymock: "4.1",
|
easymock: "4.2",
|
||||||
jackson: "2.10.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)
|
// 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
|
// 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.
|
// verify that this is fixed in some way before bumping the Jetty version.
|
||||||
|
@ -97,9 +97,9 @@ versions += [
|
||||||
lz4: "1.7.1",
|
lz4: "1.7.1",
|
||||||
mavenArtifact: "3.6.3",
|
mavenArtifact: "3.6.3",
|
||||||
metrics: "2.2.0",
|
metrics: "2.2.0",
|
||||||
mockito: "3.2.4",
|
mockito: "3.3.3",
|
||||||
owaspDepCheckPlugin: "5.2.4",
|
owaspDepCheckPlugin: "5.3.2.1",
|
||||||
powermock: "2.0.5",
|
powermock: "2.0.7",
|
||||||
reflections: "0.9.12",
|
reflections: "0.9.12",
|
||||||
rocksDB: "5.18.4",
|
rocksDB: "5.18.4",
|
||||||
scalaCollectionCompat: "2.1.4",
|
scalaCollectionCompat: "2.1.4",
|
||||||
|
@ -111,10 +111,10 @@ versions += [
|
||||||
shadowPlugin: "5.2.0",
|
shadowPlugin: "5.2.0",
|
||||||
slf4j: "1.7.30",
|
slf4j: "1.7.30",
|
||||||
snappy: "1.1.7.3",
|
snappy: "1.1.7.3",
|
||||||
spotbugs: "3.1.12",
|
spotbugs: "4.0.2",
|
||||||
spotbugsPlugin: "3.0.0",
|
spotbugsPlugin: "4.0.5",
|
||||||
spotlessPlugin: "3.27.1",
|
spotlessPlugin: "3.28.1",
|
||||||
testRetryPlugin: "1.1.0",
|
testRetryPlugin: "1.1.5",
|
||||||
zinc: "1.3.5",
|
zinc: "1.3.5",
|
||||||
zookeeper: "3.5.7",
|
zookeeper: "3.5.7",
|
||||||
zstd: "1.4.4-7"
|
zstd: "1.4.4-7"
|
||||||
|
|
|
@ -29,12 +29,17 @@
|
||||||
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \
|
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \
|
||||||
|| { echo 'Test steps failed'; exit 1; }
|
|| { echo 'Test steps failed'; exit 1; }
|
||||||
|
|
||||||
# Verify that Kafka Streams archetype compiles
|
|
||||||
if [ $JAVA_HOME = "/home/jenkins/tools/java/latest11" ] ; then
|
if [ $JAVA_HOME = "/home/jenkins/tools/java/latest11" ] ; then
|
||||||
echo "Skipping Kafka Streams archetype test for Java 11"
|
echo "Skipping Kafka Streams archetype test for Java 11"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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 \
|
./gradlew streams:install clients:install connect:json:install connect:api:install \
|
||||||
|| { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; }
|
|| { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue