Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

vinnybod
Copy link
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
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!

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

vinnybod commented Sep 9, 2024

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

Copy link
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
8 checks passed
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