Skip to content

MINOR: Upgrade gradle to 9.6.1 - #23015

Open
Parkerhiphop wants to merge 2 commits into
apache:trunkfrom
Parkerhiphop:minor/upgrade-gradle-to-9.6.1
Open

MINOR: Upgrade gradle to 9.6.1#23015
Parkerhiphop wants to merge 2 commits into
apache:trunkfrom
Parkerhiphop:minor/upgrade-gradle-to-9.6.1

Conversation

@Parkerhiphop

@Parkerhiphop Parkerhiphop commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Update Gradle from 9.4.1 to 9.6.1, including the wrapper distribution
checksum and Kafka's wrapper JAR checksum references.

Updated files:

  • gradle/dependencies.gradle
  • gradle/wrapper/gradle-wrapper.properties
  • gradlew
  • wrapper.gradle

Verified locally with Gradle 9.6.1:

  • ./gradlew --version reports Gradle 9.6.1

Build a JAR and run it

  • ./gradlew jar

Build source JAR

  • ./gradlew srcJar

Build aggregated javadoc

  • ./gradlew aggregatedJavadoc --no-parallel

Build javadoc and scaladoc

  • ./gradlew javadoc
  • ./gradlew javadocJar
  • ./gradlew scaladoc
  • ./gradlew scaladocJar
  • ./gradlew docsJar

Running a particular unit/integration test

  • ./gradlew clients:test --tests RequestResponseTest
  • ./gradlew streams:integration-tests:test --tests RestoreIntegrationTest

Running a particular test method within a unit/integration test

  • ./gradlew clients:test --tests org.apache.kafka.clients.MetadataTest.testTimeToNextUpdate
  • ./gradlew streams:integration-tests:test --tests org.apache.kafka.streams.integration.RestoreIntegrationTest.shouldRestoreNullRecord

Building a binary release gzipped tarball

  • ./gradlew clean releaseTarGz

Building auto-generated messages

  • ./gradlew processMessages processTestMessages

Running a task for a specific project

  • ./gradlew core:jar

Listing all gradle tasks

  • ./gradlew tasks

Installing all projects to the local Maven repository

  • ./gradlew -PskipSigning=true publishToMavenLocal

Building the test JAR

  • ./gradlew testJar

Running code quality checks

Checkstyle

  • ./gradlew checkstyleMain checkstyleTest spotlessCheck

SpotBugs

  • ./gradlew spotbugsMain spotbugsTest -x test

Reviewers: Chia-Ping Tsai chia7712@gmail.com

Update the Gradle wrapper and checksum references
  (dependencies.gradle, gradle-wrapper.properties, gradlew, wrapper.gradle) from 9.4.1 to 9.6.1.
@github-actions github-actions Bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Aug 1, 2026
@chia7712

chia7712 commented Aug 1, 2026

Copy link
Copy Markdown
Member

@Parkerhiphop Thanks for this patch. Would you mind testing more commands listed in the README? We encountered numerous issues when upgrading Gradle before

@m1a2st m1a2st left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test on my local machine, all passed

# Command (from README.md) Result
1 ./gradlew --version ✅ PASS — reports Gradle 9.6.1
2 ./gradlew tasks ✅ BUILD SUCCESSFUL
3 ./gradlew jar ✅ BUILD SUCCESSFUL (164 tasks, 158 executed)
4 ./gradlew clients:test --tests RequestResponseTest ✅ BUILD SUCCESSFUL — 45 test cases, 0 failed
5 ./gradlew streams:integration-tests:test --tests RestoreIntegrationTest ✅ BUILD SUCCESSFUL — 38 test cases, 0 failed
6 ./gradlew javadoc ✅ BUILD SUCCESSFUL (85 tasks)
7 ./gradlew scaladoc ✅ BUILD SUCCESSFUL (36 tasks)
8 ./gradlew -PskipSigning=true publishToMavenLocal ✅ BUILD SUCCESSFUL — 730 tasks, 65 publish-related tasks executed

@Parkerhiphop

Parkerhiphop commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@Parkerhiphop Thanks for this patch. Would you mind testing more commands listed in the README? We encountered numerous issues when upgrading Gradle before

Yes. I verified more test commands list in the README and attached them in the description.

@Parkerhiphop

Copy link
Copy Markdown
Contributor Author

Test on my local machine, all passed

Command (from README.md) Result

1 ./gradlew --version ✅ PASS — reports Gradle 9.6.1
2 ./gradlew tasks ✅ BUILD SUCCESSFUL
3 ./gradlew jar ✅ BUILD SUCCESSFUL (164 tasks, 158 executed)
4 ./gradlew clients:test --tests RequestResponseTest ✅ BUILD SUCCESSFUL — 45 test cases, 0 failed
5 ./gradlew streams:integration-tests:test --tests RestoreIntegrationTest ✅ BUILD SUCCESSFUL — 38 test cases, 0 failed
6 ./gradlew javadoc ✅ BUILD SUCCESSFUL (85 tasks)
7 ./gradlew scaladoc ✅ BUILD SUCCESSFUL (36 tasks)
8 ./gradlew -PskipSigning=true publishToMavenLocal ✅ BUILD SUCCESSFUL — 730 tasks, 65 publish-related tasks executed

Thanks for testing!

@chia7712

chia7712 commented Aug 1, 2026

Copy link
Copy Markdown
Member
Gradle Test Run :core:test > Gradle Test Executor 1 > UserClientIdQuotaTest > testThrottledRequest(String) > testThrottledRequest(String).groupProtocol=consumer FAILED
    java.lang.NoClassDefFoundError: Could not initialize class org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder
        at org.apache.kafka.test.TestSslUtils$CertificateBuilder.generate(TestSslUtils.java:441)
        at org.apache.kafka.test.TestSslUtils$CertificateBuilder.generate(TestSslUtils.java:428)
        at org.apache.kafka.test.TestSslUtils$SslConfigsBuilder.buildJks(TestSslUtils.java:666)
        at org.apache.kafka.test.TestSslUtils$SslConfigsBuilder.build(TestSslUtils.java:656)
        at org.apache.kafka.security.JaasTestUtils.sslConfigs(JaasTestUtils.java:291)
        at org.apache.kafka.security.JaasTestUtils.securityConfigs(JaasTestUtils.java:342)
        at org.apache.kafka.security.JaasTestUtils.securityConfigs(JaasTestUtils.java:315)
        at kafka.api.IntegrationTestHarness.clientSecurityProps(IntegrationTestHarness.scala:174)
        at kafka.api.IntegrationTestHarness.doSetup(IntegrationTestHarness.scala:133)
        at kafka.api.IntegrationTestHarness.setUp(IntegrationTestHarness.scala:118)
        at kafka.api.BaseQuotaTest.setUp(BaseQuotaTest.scala:85)
        at kafka.api.UserClientIdQuotaTest.setUp(UserClientIdQuotaTest.scala:35)

        Caused by:
        java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchFieldError: Class org.bouncycastle.asn1.x509.X509ObjectIdentifiers does not have member field 'org.bouncycastle.asn1.ASN1ObjectIdentifier id_rsassa_pss_shake128' [in thread "Test worker"]
            at org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder.<clinit>(Unknown Source)
            ... 12 more

8 tests completed, 8 failed

I guess the dependency order changed during the upgrade. We need to exclude bcprov-jdk15on from the core module.

    configurations {
      // To prevent a UniqueResourceException due the same resource existing in both
      // org.apache.directory.api/api-all and org.apache.directory.api/api-ldap-schema-data
      testRuntimeOnly.exclude module: 'api-ldap-schema-data'
      testFixturesImplementation.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
      testCompileClasspath.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
      testRuntimeClasspath.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
    }

@Parkerhiphop

Parkerhiphop commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Yes. I excluded bcprov-jdk15on from the core module's test compile/runtime classpaths.

I also verified it locally with:

./gradlew core:dependencyInsight --configuration testRuntimeClasspath --dependency bcprov-jdk15on
./gradlew core:test --tests kafka.api.UserClientIdQuotaTest.testThrottledRequest

The dependency insight output confirms that bcprov-jdk15on is no longer present in :core:testRuntimeClasspath:

No dependencies matching given input were found in configuration ':core:testRuntimeClasspath'

The targeted UserClientIdQuotaTest.testThrottledRequest test also passed locally.

@github-actions github-actions Bot removed the triage PRs from the community label Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions ci-approved small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants