Reputation: 26984
I'd like to analyse class dependencies in a Java project build with Bazel. I use (and recommend) degraph. degraph takes a jar as an input and generates the class relationships in a graphml file.
How can I generate this monolithic jar with bazel? It seems a BUILD target will only contain the class of it sources. As a result, the better the modularisation, the less information is left for analysis.
Upvotes: 3
Views: 1366
Reputation: 5006
The <rule_name>_deploy.jar
output of java_binary
will give you all the classes of the java_binary
and its dependencies in one jar. See https://docs.bazel.build/versions/master/be/java.html#java_binary_implicit_outputs
Upvotes: 5