Skip to content

Conversation

@dejan2609
Copy link
Contributor

@dejan2609 dejan2609 commented Apr 18, 2025

Related JIRA ticket: https://issues.apache.org/jira/browse/KAFKA-19174

List of changes:

  • prerequisite Jira ticket:
  • mandatory version upgrades:
    • Gradle version: 8.14.3 -->> 9.0.0 9.1.0
    • Gradle Shadow plugin: 8.3.6 -->> 9.0.2 8.3.9
  • build logic will be refactored to accommodate Gradle 9 breaking
    changes
  • (optional): a dozen of Gradle plugins versions will also be upgraded
  • other JIRA tickets that had to be solved all along:

Related links:

Notes:

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Apr 18, 2025
@dejan2609 dejan2609 changed the title [KAFKA-19174] Gradle version upgrade 8 -->> 9 [Work in progress] [KAFKA-19174] Gradle version upgrade 8 -->> 9 Apr 18, 2025
@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@github-actions
Copy link

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions bot added stale Stale PRs and removed needs-attention stale Stale PRs labels Jul 25, 2025
@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@dejan2609
Copy link
Contributor Author

Update: project compilation works as expected (when powered by Gradle 9) but binary release creation fails.
More work has to be done in order to accommodate to Gradle breaking changes.

@github-actions
Copy link

github-actions bot commented Aug 3, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@chia7712
Copy link
Member

chia7712 commented Aug 6, 2025

@dejan2609 any update?

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@dejan2609
Copy link
Contributor Author

@chia7712
Will provide an update during the weekend (there are two problems with Gradle 9 build, will explain in more details and provide some insights).

@chia7712
Copy link
Member

chia7712 commented Aug 8, 2025

@dejan2609 thanks!

@dejan2609
Copy link
Contributor Author

@chia7712 feel free to check this related PR: #20327

@dejan2609
Copy link
Contributor Author

Pending: I will also explain second problem (specific to Gradle 9, that is).

@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

chia7712 pushed a commit that referenced this pull request Oct 12, 2025
…ded with a `--no-parallel` switch (#20683)

Prologue:
#19513 (comment)

Also related to: #20652

@chia7712 I double-checked custom gradle commands in `README.md` and
AFAIK we should be fine now.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Oct 12, 2025
…-->> 9 (#20684)

from: #19513 (comment)

1. Fix the task `unitTest` and `integrationTest`;
2. Change the `name` to a method call `name()` for `KeepAliveMode`.

Reviewers: Ken Huang <s7133700@gmail.com>, dejan2609
 <dejan2609@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Oct 16, 2025
Extends from: #19513

details:
- scala-logging_2.13: Updated from 3.9.5 to 3.9.6
- org.owasp.dependencycheck: Updated from 12.1.3 to 12.1.8
- org.scoverage: Updated from 8.0.3 to 8.1
- com.diffplug.spotless: Updated from 7.2.1 to 8.0.0
- scalafmt: Updated from 3.7.14 to 3.10.0
- grgit: Updated from 4.1.1 to 5.3.3
- jacoco: Updated from 0.8.13 to 0.8.14
- scoverage: Updated from 2.0.11 to 2.3.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Oct 17, 2025
According to the

[discussion](#19513 (comment))
in #19513 , add a new checksum verification process to determine whether
a new  wrapper JAR needs to be downloaded.

This prevents developers  from running into incompatibility issues when
using an outdated wrapper  JAR after a Gradle upgrade.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
JimmyWang6 pushed a commit to JimmyWang6/jimmy-KAFKA-14048 that referenced this pull request Oct 19, 2025
According to the

[discussion](apache#19513 (comment))
in apache#19513 , add a new checksum verification process to determine whether
a new  wrapper JAR needs to be downloaded.

This prevents developers  from running into incompatibility issues when
using an outdated wrapper  JAR after a Gradle upgrade.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Oct 22, 2025
Related

discussion:#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
joshua2519 pushed a commit to joshua2519/kafka that referenced this pull request Oct 27, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
List of changes:
- prerequisite Jira ticket:
  - [KAFKA-19591](https://issues.apache.org/jira/browse/KAFKA-19591)
- mandatory version upgrades:
  - Gradle version: 8.14.3 -->> 9.1.0
  - Gradle Shadow plugin: 8.3.6 -->> 8.3.9
  - Gradle dependencycheck plugin: 8.2.1 -->> 12.1.3
  - Gradle spotbugs plugin: 6.2.3 -->> 6.2.5
  - Gradle spotless plugin: 6.25.0 -->> 7.2.1
- build logic will be refactored to accommodate Gradle 9 breaking
changes
- (optional): a dozen of Gradle plugins versions will also be upgraded
- other JIRA tickets that had to be solved all along:
  - [KAFKA-16801](https://issues.apache.org/jira/browse/KAFKA-16801)
  - [KAFKA-19654](https://issues.apache.org/jira/browse/KAFKA-19654)

 **Related links:**
- https://gradle.org/whats-new/gradle-9
- https://github.com/gradle/gradle/releases/tag/v9.0.0
- https://docs.gradle.org/9.0.0/release-notes.html
- https://docs.gradle.org/9.0.0/userguide/upgrading_major_version_9.html
- https://docs.gradle.org/9.1.0/release-notes.html

Notes:
- new Gradle version brings up some breaking changes, as always 😃
- Kafka build with Gradle 9 has same issues as other projects:
  - redhat-developer/vscode-java#4018
  - gradle/gradle#32597

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
…ome issues with Gradle 9+ are solved) (apache#20652)

Extends from: apache#19513

Note: in Gradle 9+ we have to add a switch like this:
```
./gradlew dependencyUpdates --no-parallel
```
Related link:
https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.53.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
…ded with a `--no-parallel` switch (apache#20683)

Prologue:
apache#19513 (comment)

Also related to: apache#20652

@chia7712 I double-checked custom gradle commands in `README.md` and
AFAIK we should be fine now.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
…-->> 9 (apache#20684)

from: apache#19513 (comment)

1. Fix the task `unitTest` and `integrationTest`;
2. Change the `name` to a method call `name()` for `KeepAliveMode`.

Reviewers: Ken Huang <s7133700@gmail.com>, dejan2609
 <dejan2609@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
Extends from: apache#19513

details:
- scala-logging_2.13: Updated from 3.9.5 to 3.9.6
- org.owasp.dependencycheck: Updated from 12.1.3 to 12.1.8
- org.scoverage: Updated from 8.0.3 to 8.1
- com.diffplug.spotless: Updated from 7.2.1 to 8.0.0
- scalafmt: Updated from 3.7.14 to 3.10.0
- grgit: Updated from 4.1.1 to 5.3.3
- jacoco: Updated from 0.8.13 to 0.8.14
- scoverage: Updated from 2.0.11 to 2.3.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
According to the

[discussion](apache#19513 (comment))
in apache#19513 , add a new checksum verification process to determine whether
a new  wrapper JAR needs to be downloaded.

This prevents developers  from running into incompatibility issues when
using an outdated wrapper  JAR after a Gradle upgrade.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Dec 3, 2025
Extends from: apache#19513

details:
- scala-logging_2.13: Updated from 3.9.5 to 3.9.6
- org.owasp.dependencycheck: Updated from 12.1.3 to 12.1.8
- org.scoverage: Updated from 8.0.3 to 8.1
- com.diffplug.spotless: Updated from 7.2.1 to 8.0.0
- scalafmt: Updated from 3.7.14 to 3.10.0
- grgit: Updated from 4.1.1 to 5.3.3
- jacoco: Updated from 0.8.13 to 0.8.14
- scoverage: Updated from 2.0.11 to 2.3.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Dec 3, 2025
According to the

[discussion](apache#19513 (comment))
in apache#19513 , add a new checksum verification process to determine whether
a new  wrapper JAR needs to be downloaded.

This prevents developers  from running into incompatibility issues when
using an outdated wrapper  JAR after a Gradle upgrade.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Dec 3, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
List of changes:
- prerequisite Jira ticket:
  - [KAFKA-19591](https://issues.apache.org/jira/browse/KAFKA-19591)
- mandatory version upgrades:
  - Gradle version: 8.14.3 -->> 9.1.0
  - Gradle Shadow plugin: 8.3.6 -->> 8.3.9
  - Gradle dependencycheck plugin: 8.2.1 -->> 12.1.3
  - Gradle spotbugs plugin: 6.2.3 -->> 6.2.5
  - Gradle spotless plugin: 6.25.0 -->> 7.2.1
- build logic will be refactored to accommodate Gradle 9 breaking
changes
- (optional): a dozen of Gradle plugins versions will also be upgraded
- other JIRA tickets that had to be solved all along:
  - [KAFKA-16801](https://issues.apache.org/jira/browse/KAFKA-16801)
  - [KAFKA-19654](https://issues.apache.org/jira/browse/KAFKA-19654)

 **Related links:**
- https://gradle.org/whats-new/gradle-9
- https://github.com/gradle/gradle/releases/tag/v9.0.0
- https://docs.gradle.org/9.0.0/release-notes.html
- https://docs.gradle.org/9.0.0/userguide/upgrading_major_version_9.html
- https://docs.gradle.org/9.1.0/release-notes.html

Notes:
- new Gradle version brings up some breaking changes, as always 😃
- Kafka build with Gradle 9 has same issues as other projects:
  - redhat-developer/vscode-java#4018
  - gradle/gradle#32597

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
…ome issues with Gradle 9+ are solved) (apache#20652)

Extends from: apache#19513

Note: in Gradle 9+ we have to add a switch like this:
```
./gradlew dependencyUpdates --no-parallel
```
Related link:
https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.53.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
…ded with a `--no-parallel` switch (apache#20683)

Prologue:
apache#19513 (comment)

Also related to: apache#20652

@chia7712 I double-checked custom gradle commands in `README.md` and
AFAIK we should be fine now.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
…-->> 9 (apache#20684)

from: apache#19513 (comment)

1. Fix the task `unitTest` and `integrationTest`;
2. Change the `name` to a method call `name()` for `KeepAliveMode`.

Reviewers: Ken Huang <s7133700@gmail.com>, dejan2609
 <dejan2609@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
Extends from: apache#19513

details:
- scala-logging_2.13: Updated from 3.9.5 to 3.9.6
- org.owasp.dependencycheck: Updated from 12.1.3 to 12.1.8
- org.scoverage: Updated from 8.0.3 to 8.1
- com.diffplug.spotless: Updated from 7.2.1 to 8.0.0
- scalafmt: Updated from 3.7.14 to 3.10.0
- grgit: Updated from 4.1.1 to 5.3.3
- jacoco: Updated from 0.8.13 to 0.8.14
- scoverage: Updated from 2.0.11 to 2.3.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
According to the

[discussion](apache#19513 (comment))
in apache#19513 , add a new checksum verification process to determine whether
a new  wrapper JAR needs to be downloaded.

This prevents developers  from running into incompatibility issues when
using an outdated wrapper  JAR after a Gradle upgrade.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11 pushed a commit to shashankhs11/kafka that referenced this pull request Dec 15, 2025
Related

discussion:apache#20561 (comment)

This PR primarily upgrades release tooling to JDK 25,  and includes  two
fixes identified while dry-running `release.py` locally.

1. JDK upgrade:  Switches `release.py` to run under JDK 25.

2. Pre‑req check false negative in git clean‑state verification task

* When running `release.py` with a clean working tree, the script
incorrectly failed the pre‑requisite check.

```bash
$ git status
On branch MINOR-1014
nothing to commit, working tree clean

$ python release.py
...
FAILURE: Pre-requisite not met: Verifying that you have no unstaged git
changes.
```
* Root cause: the checks used `has_unstaged_changes()` /
`has_staged_changes()` in a way that treated success as “has changes”.
The fix inverts the logic to assert **no** changes.

3. Gradle 9 aggregatedJavadoc failure

* With **Gradle 9**, `aggregatedJavadoc` currently fails in parallel
mode.
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregatedJavadoc'.
> Resolution of the configuration ':connect:compileClasspath' was
attempted without an exclusive lock. This is unsafe and not allowed.
```
* The change adds `--no-parallel` for the aggregated Javadoc step to
avoid build failures (discussion:
apache#19513 (comment))

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ming-Yen Chung
 <mingyen066@gmail.com>, kuoche1712003 <kuoche1712003@gmail.com>,
 Chia-Ping Tsai <chia7712@gmail.com>
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 tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants