Skip to content

Commit

Permalink
Added native.oss.bzl file (PolymerLabs#4170)
Browse files Browse the repository at this point in the history
* Added native.oss.bzl file

This file just re-exports "native" build rules, e.g. java_library. Instead of loading these from @java_rules, we now load them from this native.oss.bzl file.

This will help with importing into google, where referencing those external repos (@java_rules) is not needed.

* Fix paths
  • Loading branch information
csilvestrini authored Nov 28, 2019
1 parent bf715a5 commit 1948f82
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
6 changes: 5 additions & 1 deletion javaharness/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
load("@rules_java//java:defs.bzl", "java_library", "java_plugin")
load(
"//third_party/java/arcs/build_defs:native.oss.bzl",
"java_library",
"java_plugin",
)

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 1 addition & 1 deletion javaharness/javatests/arcs/android/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_java//java:defs.bzl", "java_test")
load("//third_party/java/arcs/build_defs:native.oss.bzl", "java_test")

licenses(["notice"])

Expand Down
2 changes: 1 addition & 1 deletion javaharness/javatests/arcs/api/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_java//java:defs.bzl", "java_test")
load("//third_party/java/arcs/build_defs:native.oss.bzl", "java_test")

licenses(["notice"])

Expand Down
2 changes: 1 addition & 1 deletion javaharness/javatests/arcs/crdt/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_java//java:defs.bzl", "java_test")
load("//third_party/java/arcs/build_defs:native.oss.bzl", "java_test")

licenses(["notice"])

Expand Down
17 changes: 17 additions & 0 deletions third_party/java/arcs/build_defs/native.oss.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Re-exports some "native" build rules.
Use these in Arcs instead of loading them from the external repos directly.
"""

load(
"@rules_java//java:defs.bzl",
_java_library = "java_library",
_java_plugin = "java_plugin",
_java_test = "java_test",
)

java_library = _java_library

java_plugin = _java_plugin

java_test = _java_test

0 comments on commit 1948f82

Please sign in to comment.