Build cleaner for Java

377 views
Skip to first unread message

Gaurav Nanda

unread,
May 18, 2022, 5:01:11 PM5/18/22
to bazel-discuss
Hey! 

I am an x-googler, who loved the build cleaner to automatically remove the unused dependencies from Java_library targets.

Do we have an equivalent tool available for Bazel with Java? I found a few on awesomebazel.com - but none of those seem to work or have been deprecated. 

Gaurav Nanda

unread,
May 18, 2022, 5:06:14 PM5/18/22
to Jiawen Chen, bazel-discuss
Tried this, but does not seem to work, looks like the last commit happened in 2018.

On Wed, May 18, 2022 at 2:03 PM Jiawen Chen <jia...@gmail.com> wrote:

EXTERNAL EMAIL - Use caution when opening attachments, clicking links, or responding.


How about unused_deps?

-Jiawen

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/6d71956d-5490-44b1-bff6-be8896b10cb0n%40googlegroups.com.

Gaurav Nanda

unread,
May 18, 2022, 5:08:50 PM5/18/22
to bazel-discuss
Sorry - there are recent commits. But when I tried this one, it seems to remove almost all of the dependencies.

Jiawen Chen

unread,
May 19, 2022, 3:09:15 AM5/19/22
to Gaurav Nanda, bazel-discuss
How about unused_deps?

-Jiawen

On Wed, May 18, 2022 at 2:01 PM 'Gaurav Nanda' via bazel-discuss <bazel-...@googlegroups.com> wrote:
--

Alex Eagle

unread,
May 20, 2022, 10:19:48 AM5/20/22
to bazel-discuss
There's also a (new) Java Gazelle extension in https://github.com/bazel-contrib/rules_jvm/tree/main/java/gazelle which I'd expect to mostly manage java_* rules.
Reply all
Reply to author
Forward
0 new messages