
This change is fixing "All Java build rules should be loaded from Starlark" warning flagged by latest buildifier version: [1]. Python rules are now also loaded from the Starlark. Also extract codemirror library import to BUILD file. This is needed to avoid cycle in the workspace file, after importing java rules from Starlark. [1] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#native-java Change-Id: I36192c9465d988b25cf09c250e110f15850910cd
27 lines
662 B
Python
27 lines
662 B
Python
load("@rules_java//java:defs.bzl", "java_import", "java_library")
|
|
load("//lib/codemirror:cm.bzl", "pkg_cm")
|
|
|
|
# This library is only used to insert a license statement into
|
|
# js_licenses.txt.
|
|
java_library(
|
|
name = "diff-match-patch",
|
|
data = ["//lib:LICENSE-Apache2.0"],
|
|
runtime_deps = ["@diff-match-patch//jar"],
|
|
)
|
|
|
|
pkg_cm()
|
|
|
|
LICENSE = "//lib:LICENSE-codemirror-original"
|
|
|
|
LICENSE_MINIFIED = "//lib:LICENSE-codemirror-minified"
|
|
|
|
[java_import(
|
|
name = "codemirror" + suffix,
|
|
data = [license],
|
|
jars = [":jar%s" % suffix],
|
|
visibility = ["//visibility:public"],
|
|
) for suffix, license in [
|
|
("", LICENSE),
|
|
("_r", LICENSE_MINIFIED),
|
|
]]
|