Skip to content
Permalink
Browse files

Remove deprecated _js_srcs.

All javascript srcs could be passed like regular srcs in srcs attribute.

PiperOrigin-RevId: 246361921
  • Loading branch information...
gkdn authored and Copybara-Service committed May 2, 2019
1 parent 12ca21b commit cabc31d434f2916fde7a6e4df7e0471a56178ef0
Showing with 6 additions and 10 deletions.
  1. +0 −3 build_defs/internal_do_not_use/j2cl_library.bzl
  2. +6 −7 jre/java/j2cl_mirror_from_gwt.bzl
@@ -32,7 +32,6 @@ def j2cl_library(
name,
native_srcs = [],
generate_build_test = None,
_js_srcs = [],
_js_deps = [],
_js_exports = [],
**kwargs):
@@ -52,7 +51,6 @@ def j2cl_library(
NOT labels of java_library() rules.
"""
# Private Args:
# _js_srcs: JavaScript source files (.js) to include in the bundle.
# _js_deps: Direct JavaScript dependencies needed by native code (either
# via srcs in _js_srcs or via JsInterop/native.js).
# For the JsInterop scenario, we encourage developers to create
@@ -62,7 +60,6 @@ def j2cl_library(

args = dict(kwargs)
_append(args, "srcs", native_srcs)
_append(args, "srcs", _js_srcs)
_append(args, "deps", _js_deps)
_append(args, "exports", _js_exports)

@@ -37,14 +37,12 @@ java_source_copy = rule(
def j2cl_mirror_from_gwt(
name,
mirrored_files,
extra_srcs = [],
extra_js_srcs = [],
excluded_srcs = [],
deps = [],
**kwargs):
super_srcs = native.glob(["**/*.java"], exclude = excluded_srcs) + extra_srcs
native_srcs = native.glob(["**/*.native.js"])
js_srcs = native.glob(["**/*.js"], exclude = native_srcs) + extra_js_srcs
super_srcs = native.glob(["**/*.java"], exclude = excluded_srcs)
native_srcs = native.glob(["**/*.js"]) + extra_js_srcs

java_source_copy(
name = name + "_copy",
@@ -64,9 +62,10 @@ def j2cl_mirror_from_gwt(

j2cl_library(
name = name,
srcs = [":" + name + "_java_files"],
native_srcs = [":" + name + "_native_files"],
srcs = [
":" + name + "_java_files",
":" + name + "_native_files",
],
deps = deps,
_js_srcs = js_srcs,
**kwargs
)

0 comments on commit cabc31d

Please sign in to comment.
You can’t perform that action at this time.