Skip to content

MINOR: Cleanup build.gradle unused dependency - #22903

Merged
chia7712 merged 4 commits into
apache:trunkfrom
m1a2st:MINOR-cleanup-gradle
Jul 22, 2026
Merged

MINOR: Cleanup build.gradle unused dependency#22903
chia7712 merged 4 commits into
apache:trunkfrom
m1a2st:MINOR-cleanup-gradle

Conversation

@m1a2st

@m1a2st m1a2st commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Cleanup unused dependencies in build.gradle

  1. libs.spotbugs: he SpotBugs Gradle plugin performs static analysis
    using its own bundled jar, it does not require this compile-time
    dependency.
  2. libs.jacksonJDK8Datatypes: Jackson 2.15+ baked Optional support
    directly into jackson-databind core.
  3. libs.jmhCoreBenchmarks: Benchmarks only use jmh-core (annotations,
    Blackhole, Runner) and jmh-generator-annprocess. No source file imports
    anything from the org.openjdk.jmh.samples or benchmarks package.
  4. libs.bndlib: Safely removed as no modules currently depend on it.
  5. libs.jacksonDataformatYaml & libs.junitPlatformLanucher: Removed
    from individual submodules because they are already globally included in
    the runtimeTestLibs array.
  6. libs.caffeine & libs.hdrHistogram: group-coordinator does not use
    them
  7. libs.jacksonDataformatCsv, libs.jacksonJakartarsJsonProvider, and
    libs.junitPlatformSuiteEngine: Removed from specific modules as they
    are either no longer directly imported or handled implicitly

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 Jul 22, 2026
@m1a2st
m1a2st force-pushed the MINOR-cleanup-gradle branch from 7437d04 to 54683a3 Compare July 22, 2026 03:06
@m1a2st m1a2st changed the title MINOR: cleanup build.gradle unused dependency (WIP) MINOR: Cleanup build.gradle unused dependency (WIP) Jul 22, 2026
@m1a2st m1a2st changed the title MINOR: Cleanup build.gradle unused dependency (WIP) MINOR: Cleanup build.gradle unused dependency Jul 22, 2026
Comment thread build.gradle
apply plugin: 'java-test-fixtures'

dependencies {
compileOnly libs.bndlib

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems no module depends on bndlib, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

reference: #17373 (comment)

In short, we can remove it safely :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I have addressed this

Comment thread build.gradle
implementation libs.jose4j // for SASL/OAUTHBEARER JWT validation
implementation libs.jacksonJakartarsJsonProvider

compileOnly libs.spotbugs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you remove testImplementation libs.spotbugs as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure, addressed it.

Comment thread build.gradle
testImplementation testLog4j2Libs

testRuntimeOnly runtimeTestLibs
testRuntimeOnly libs.junitPlatformLanucher

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ugh, that is a typo: junitPlatformLanucher 😆

we can address it in a follow-up

@chia7712
chia7712 merged commit 13f5dd3 into apache:trunk Jul 22, 2026
26 checks passed
@github-actions github-actions Bot removed the triage PRs from the community label Jul 23, 2026
@chia7712

Copy link
Copy Markdown
Member

@m1a2st would you mind creating a follow-up PR to remove testImplementation project(':storage:storage-api').sourceSets.main.output?

@m1a2st

m1a2st commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Sure, I will open a patch to address it

chia7712 pushed a commit that referenced this pull request Jul 24, 2026
See the comment:
#22903 (comment)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
nileshkumar3 pushed a commit to nileshkumar3/kafka that referenced this pull request Jul 25, 2026
Cleanup unused dependencies in `build.gradle`

1. `libs.spotbugs`: he SpotBugs Gradle plugin performs static analysis
using its own bundled jar, it does not require this compile-time
dependency.
2. `libs.jacksonJDK8Datatypes`: Jackson 2.15+ baked Optional support
directly into jackson-databind core.
3. `libs.jmhCoreBenchmarks`: Benchmarks only use jmh-core (annotations,
Blackhole, Runner) and jmh-generator-annprocess. No source file imports
anything from the org.openjdk.jmh.samples or benchmarks package.
4. `libs.bndlib`: Safely removed as no modules currently depend on it.
5. `libs.jacksonDataformatYaml` & `libs.junitPlatformLanucher`: Removed
from individual submodules because they are already globally included in
the runtimeTestLibs array.
6. `libs.caffeine` & `libs.hdrHistogram`: group-coordinator does not use
them
7. `libs.jacksonDataformatCsv`, `libs.jacksonJakartarsJsonProvider`, and
`libs.junitPlatformSuiteEngine`: Removed from specific modules as they
are either no longer directly imported or handled implicitly

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
nileshkumar3 pushed a commit to nileshkumar3/kafka that referenced this pull request Jul 25, 2026
See the comment:
apache#22903 (comment)

Reviewers: 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 small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants