Bazel: Move codemirror library import to cm.bzl
It was changed in I36192c9465d but this part of that change can be reverted, after rules_java is loaded in WORKSPACE file through the rules_closure repository. That is why the load of codemirror:cm.bzl can only be included after rules_closure repository is loaded. Change-Id: I0f6769cd59bb9da0a96929a51756d4c0972ae1ca
This commit is contained in:
@@ -2,7 +2,6 @@ workspace(name = "gerrit")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
|
||||
load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_LOCAL", "maven_jar")
|
||||
load("//lib/codemirror:cm.bzl", "CM_VERSION", "DIFF_MATCH_PATCH_VERSION")
|
||||
load("//plugins:external_plugin_deps.bzl", "external_plugin_deps")
|
||||
|
||||
http_archive(
|
||||
@@ -89,6 +88,9 @@ closure_repositories(
|
||||
omit_rules_cc = True,
|
||||
)
|
||||
|
||||
# This has to be done after loading of rules_closure, because it loads rules_java
|
||||
load("//lib/codemirror:cm.bzl", "CM_VERSION", "DIFF_MATCH_PATCH_VERSION")
|
||||
|
||||
ANTLR_VERS = "3.5.2"
|
||||
|
||||
maven_jar(
|
||||
|
@@ -1,4 +1,4 @@
|
||||
load("@rules_java//java:defs.bzl", "java_import", "java_library")
|
||||
load("@rules_java//java:defs.bzl", "java_library")
|
||||
load("//lib/codemirror:cm.bzl", "pkg_cm")
|
||||
|
||||
# This library is only used to insert a license statement into
|
||||
@@ -10,17 +10,3 @@ java_library(
|
||||
)
|
||||
|
||||
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),
|
||||
]]
|
||||
|
@@ -1,3 +1,4 @@
|
||||
load("@rules_java//java:defs.bzl", "java_import")
|
||||
load("//tools/bzl:genrule2.bzl", "genrule2")
|
||||
|
||||
CM_CSS = [
|
||||
@@ -362,3 +363,10 @@ def pkg_cm():
|
||||
],
|
||||
outs = ["codemirror%s.jar" % suffix],
|
||||
)
|
||||
|
||||
java_import(
|
||||
name = "codemirror" + suffix,
|
||||
jars = [":jar%s" % suffix],
|
||||
visibility = ["//visibility:public"],
|
||||
data = [license],
|
||||
)
|
||||
|
Reference in New Issue
Block a user