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

Make source jars from java_library available to Skylark. #214

Closed
wants to merge 1 commit into from
Closed

Make source jars from java_library available to Skylark. #214

wants to merge 1 commit into from

Conversation

ekuefler
Copy link
Contributor

This is necessary to implement GWT support in Bazel, which requires source jars
on the classpath. With this change, I can build a GWT classpath as follows:

  all_deps = ctx.files.deps
  for this_dep in ctx.attr.deps:
    p = provider(this_dep, "rules.java.JavaSourceJarsProvider")
    if p: all_deps += p.source_jars
  classpath = ":".join([dep.path for dep in all_deps])

See #146 for discussion

This is necessary to implement GWT support in Bazel, which requires source jars
on the classpath. With this change, I can build a GWT classpath as follows:

  all_deps = ctx.files.deps
  for this_dep in ctx.attr.deps:
    p = provider(this_dep, "rules.java.JavaSourceJarsProvider")
    if p: all_deps += p.source_jars
  classpath = ":".join([dep.path for dep in all_deps])
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@damienmg
Copy link
Contributor

damienmg commented Jun 1, 2015

IMO Exposings this provider makes sense but can we have documentation? Also if you use your @google.com email when sending a PR then the googlebot won't complain. (Btw, for real review, we prefer to use Gerrit at https://bazel-review.googlesource.com).

@ekuefler
Copy link
Contributor Author

ekuefler commented Jun 2, 2015

No problem, added docs and pushed to Gerrit at #214. I'm not at Google any more, so I'll have to stick with this email, but I've signed the CLA now.

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.

3 participants