Unused Deps
latest 10.2.0_20261028Static analysis for Bazel java_library targets that finds unused dependencies and emits the buildozer commands to remove them
Versions · 70
click = copy identifier · right-click = more- yanked — ·
- yanked — ·
README
Unused Deps
unused-deps finds dependencies listed on a Bazel java_library target that
the code never actually uses — anyone trying to keep a Java BUILD graph
lean, or trim a target's compile-time closure, runs it before pruning deps
by hand.
It takes one or more target labels, checks each java_library's declared
deps against what its sources actually import, and prints the buildozer
commands that would remove the unused ones. It never edits a file itself.
What's included
- unused-deps — the single static binary. No runtime dependencies.
Usage
unused-deps //pkg:my_java_library
Prints a buildozer 'remove deps ...' line for each dependency the target
doesn't need.
unused-deps ships from the same repository and release as buildifier
and buildozer — if you need one, the other two are one ocx add away.
Links
Apache-2.0 licensed.
Install
Platforms
Support matrix
Which platforms each version ships for. Click a version to copy its identifier.
No version supports all the chosen platforms.
The versions could not be loaded.
No platforms listed.