Skip to content

Add support for resources in javadoc jars and make variable substitution in javadoc arguments#1238

Merged
shs96c merged 10 commits into
bazel-contrib:masterfrom
vinnybod:vinnybod/upstream-javadocs-updates
Sep 9, 2024
Merged

Add support for resources in javadoc jars and make variable substitution in javadoc arguments#1238
shs96c merged 10 commits into
bazel-contrib:masterfrom
vinnybod:vinnybod/upstream-javadocs-updates

Conversation

@vinnybod
Copy link
Copy Markdown
Contributor

@vinnybod vinnybod commented Sep 7, 2024

Note: This is a dupe of #1182 . I had to reopen the PR from a different GH org.


There's two use cases I'm trying to account for here.

  1. I need to add resources to the javadoc jar such as a LICENSE file.
  2. I need to send a --define variable to the javadoc generator so that the maven_version variable I have set will appear in the <title> of the generated html. rules_jvm_external already supports the same type of substitution on the coordinates attribute.
java_export(
    name = "lib",
    maven_coordinates="com.example:lib:$(maven_version)",
    ...
    javadocopts=["-windowtitle", "$(maven_version)"],
    doc_resources = ["//:LICENSE"]
)

Copy link
Copy Markdown
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

Two small nits, and then I'll merge. Thank you for re-opening!

Comment thread private/rules/javadoc.bzl Outdated
Comment thread tests/com/github/bazelbuild/rules_jvm_external/BUILD Outdated
@vinnybod vinnybod requested a review from shs96c September 9, 2024 16:34
@vinnybod
Copy link
Copy Markdown
Contributor Author

vinnybod commented Sep 9, 2024

@shs96c Made the suggested changes, this is ready for another review. Thanks!

Copy link
Copy Markdown
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for making the changes!

@shs96c shs96c merged commit 9f2291c into bazel-contrib:master Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants