Files
gerrit/gerrit-launcher/BUILD
Han-Wen Nienhuys e6c7e629c6 bazel: abstract the build system in static serving.
Provide BazelBuild to stub out the Bazel build.

Tested:

Production use case:
1.) bazel build polygerrit && \
    $(bazel info output_base)/external/local_jdk/bin/java \
     -jar bazel-bin/polygerrit.war daemon -d ../test_site \
     --console-log --show-stack-trace

Development mode use cases:
2.) bazel build polygerrit \
      //polygerrit-ui:polygerrit_components.bower_components.zip &&
    $(bazel info output_base)/external/local_jdk/bin/java \
     -jar bazel-bin/polygerrit.war daemon \
     --polygerrit-dev -d ../gerrit_testsite --console-log --show-stack-trace

checked that updates under polygerrit-ui/app/index.html are served
live.

3.) Run tools/eclipse/project.py, started gwt_daemon launcher,
verified that it worked.

4.) Run tools/eclipse/project.py, started gerit_gwt_debug launcher,
verified that GWT SDM worked.

Change-Id: I9d105e00e953b63c78306e9e37d5152673627727
2016-11-13 07:27:17 -08:00

20 lines
650 B
Python

# NOTE: GerritLauncher must be a single, self-contained class. Do not add any
# additional srcs or deps to this rule.
java_library(
name = 'launcher',
srcs = ['src/main/java/com/google/gerrit/launcher/GerritLauncher.java'],
resources = [':workspace-root.txt'],
visibility = ['//visibility:public'],
)
# The root of the workspace is non-hermetic, but we need it for
# on-the-fly GWT recompiles and PolyGerrit updates.
genrule(
name = 'gen_root',
stamp = 1,
cmd = ("cat bazel-out/stable-status.txt | " +
"grep STABLE_WORKSPACE_ROOT | cut -d ' ' -f 2 > $@"),
outs = ['workspace-root.txt'],
visibility = ['//visibility:public'],
)