|
Add compile_jars Skylark accessor to JavaProvider. This outputs the
non-recursive set of jars needed to build with this target. Allows
Skylark tools to get the same set of compile_jars that JavaLibrary is
getting.
Added test that verifies Skylark was getting lists from both
compile_jars and transitive_runtime_jars of the expected length. Then,
verified (via test code) those nested sets were identical to the ones
provided by the java_library.
To reviewers:
First, would like to add documentation flags to these fields in
JavaProvider. Is it possible, instead of adding them to this map to
follow use the @SkylarkCallable annotation to expose methods on
JavaProvider instead? It would then also be nice to mark these as
experimental since won't really know the final API until
java_skylark_library sandwich is done.
I also tested this locally via bazel build //src:bazel and then doing
~/bazelsandbox/bazel/bazel-bin/src/bazel test SomeTarget in a different
repo that had a .bzl file trying to use compile_jars.
Change-Id: I1779c1b6303f36e50076c3479bfcb15a25aa95d8
PiperOrigin-RevId: 155191816
|