c7eb16648b
Bazel@HEAD supports Java 9 and the upcoming Bazel release 0.15.0 will include Java 9 JDK. Test Plan: $ bazel test \ --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 \ --java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 //... Change-Id: I9d6b716391bbf96b0894a8f3be900bcf8ef48903
83 lines
1.9 KiB
Python
83 lines
1.9 KiB
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load("//tools/bzl:genrule2.bzl", "genrule2")
|
|
load("//tools/bzl:pkg_war.bzl", "pkg_war")
|
|
|
|
config_setting(
|
|
name = "java9",
|
|
values = {
|
|
"java_toolchain": "@bazel_tools//tools/jdk:toolchain_java9",
|
|
},
|
|
)
|
|
|
|
genrule(
|
|
name = "gen_version",
|
|
outs = ["version.txt"],
|
|
cmd = ("cat bazel-out/volatile-status.txt bazel-out/stable-status.txt | " +
|
|
"grep STABLE_BUILD_GERRIT_LABEL | cut -d ' ' -f 2 > $@"),
|
|
stamp = 1,
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
genrule(
|
|
name = "LICENSES",
|
|
srcs = ["//Documentation:licenses.txt"],
|
|
outs = ["LICENSES.txt"],
|
|
cmd = "cp $< $@",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_war(
|
|
name = "gerrit",
|
|
ui = "polygerrit",
|
|
)
|
|
|
|
pkg_war(
|
|
name = "headless",
|
|
ui = None,
|
|
)
|
|
|
|
pkg_war(
|
|
name = "polygerrit",
|
|
ui = "polygerrit",
|
|
)
|
|
|
|
pkg_war(
|
|
name = "release",
|
|
context = ["//plugins:core"],
|
|
doc = True,
|
|
ui = "ui_optdbg_r",
|
|
)
|
|
|
|
pkg_war(
|
|
name = "withdocs",
|
|
doc = True,
|
|
)
|
|
|
|
API_DEPS = [
|
|
"//java/com/google/gerrit/acceptance:framework_deploy.jar",
|
|
"//java/com/google/gerrit/acceptance:libframework-lib-src.jar",
|
|
"//java/com/google/gerrit/acceptance:framework-javadoc",
|
|
"//java/com/google/gerrit/extensions:extension-api_deploy.jar",
|
|
"//java/com/google/gerrit/extensions:libapi-src.jar",
|
|
"//java/com/google/gerrit/extensions:extension-api-javadoc",
|
|
"//plugins:plugin-api_deploy.jar",
|
|
"//plugins:plugin-api-sources_deploy.jar",
|
|
"//plugins:plugin-api-javadoc",
|
|
"//gerrit-plugin-gwtui:gwtui-api_deploy.jar",
|
|
"//gerrit-plugin-gwtui:gwtui-api-source_deploy.jar",
|
|
"//gerrit-plugin-gwtui:gwtui-api-javadoc",
|
|
]
|
|
|
|
genrule2(
|
|
name = "api",
|
|
testonly = 1,
|
|
srcs = API_DEPS,
|
|
outs = ["api.zip"],
|
|
cmd = " && ".join([
|
|
"cp $(SRCS) $$TMP",
|
|
"cd $$TMP",
|
|
"zip -qr $$ROOT/$@ .",
|
|
]),
|
|
)
|