Bazel: Remove standalone build mode This is a preparation change for migration to Polymer 3. Change-Id: I5d2e2ec8ebad8126c1c247e090ba9202e6d55687
diff --git a/.bazelignore b/.bazelignore deleted file mode 100644 index 30f1613..0000000 --- a/.bazelignore +++ /dev/null
@@ -1 +0,0 @@ -eclipse-out
diff --git a/.bazelrc b/.bazelrc deleted file mode 100644 index 3ae03ff..0000000 --- a/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command="python ./tools/workspace_status.py" -test --build_tests_only
diff --git a/.bazelversion b/.bazelversion deleted file mode 100644 index 4a36342..0000000 --- a/.bazelversion +++ /dev/null
@@ -1 +0,0 @@ -3.0.0
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a6ef529..0000000 --- a/.gitignore +++ /dev/null
@@ -1,10 +0,0 @@ -/.classpath -/.project -/.settings -*.pyc -bazel-bin -bazel-out -bazel-testlogs -bazel-verify-status -eclipse-out -/.apt_generated/
diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index ddb1efb..0000000 --- a/WORKSPACE +++ /dev/null
@@ -1,60 +0,0 @@ -workspace(name = "verify_status") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "9e23df10840ca3976431c842fdada58c7a51c6e3", - #local_path = "/home/<user>/projects/bazlets", -) - -# Polymer dependencies -load( - "@com_googlesource_gerrit_bazlets//:gerrit_polymer.bzl", - "gerrit_polymer", -) - -gerrit_polymer() - -# Load closure compiler with transitive dependencies -load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains") - -rules_closure_dependencies() - -rules_closure_toolchains() - -# Load Gerrit npm_binary toolchain -load("@com_googlesource_gerrit_bazlets//tools:js.bzl", "GERRIT", "npm_binary") -npm_binary( - name = "polymer-bundler", - repository = GERRIT, -) -npm_binary( - name = "crisper", - repository = GERRIT, -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt() - -load("@com_googlesource_gerrit_bazlets//tools:maven_jar.bzl", "maven_jar")
diff --git a/bazlets.bzl b/bazlets.bzl deleted file mode 100644 index f089af4..0000000 --- a/bazlets.bzl +++ /dev/null
@@ -1,18 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md index e9e1526..337f618 100644 --- a/src/main/resources/Documentation/build.md +++ b/src/main/resources/Documentation/build.md
@@ -6,34 +6,8 @@ Bazel ---- -Two build modes are supported: Standalone and in Gerrit tree. -The standalone build mode is recommended, as this mode doesn't require -the Gerrit tree to exist locally. - -### Build standalone - -To build the plugin, issue the following command: - -``` - bazel build verify-status -``` - -The output is created in - -``` - bazel-bin/@PLUGIN@.jar -``` - -To execute the tests run: - -``` - bazel test //... -``` - -### Build in Gerrit tree - -Clone or link this plugin to the plugins directory of Gerrit's source -tree. +To build in Gerrit tree clone or link this plugin to the plugins +directory of Gerrit's source tree. Put the external dependency Bazel build file into the Gerrit /plugins directory, replacing the existing empty one. @@ -76,12 +50,9 @@ and issue the command: ``` - ./tools/eclipse/project_bzl.py + ./tools/eclipse/project.py ``` -How to build the Gerrit Plugin API is described in the [Gerrit -documentation](../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files). - [Back to @PLUGIN@ documentation index][index] [index]: index.html
diff --git a/tools/bzl/BUILD b/tools/bzl/BUILD deleted file mode 100644 index c5ed0b7..0000000 --- a/tools/bzl/BUILD +++ /dev/null
@@ -1 +0,0 @@ -# Empty file required by Bazel
diff --git a/tools/bzl/classpath.bzl b/tools/bzl/classpath.bzl deleted file mode 100644 index c921d01..0000000 --- a/tools/bzl/classpath.bzl +++ /dev/null
@@ -1,6 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//tools:classpath.bzl", - _classpath_collector = "classpath_collector", -) - -classpath_collector = _classpath_collector
diff --git a/tools/bzl/genrule2.bzl b/tools/bzl/genrule2.bzl deleted file mode 100644 index 61c4e18..0000000 --- a/tools/bzl/genrule2.bzl +++ /dev/null
@@ -1,3 +0,0 @@ -load("@com_googlesource_gerrit_bazlets//tools:genrule2.bzl", _genrule2 = "genrule2") - -genrule2 = _genrule2
diff --git a/tools/bzl/js.bzl b/tools/bzl/js.bzl deleted file mode 100644 index 0f9e367..0000000 --- a/tools/bzl/js.bzl +++ /dev/null
@@ -1,3 +0,0 @@ -load("@com_googlesource_gerrit_bazlets//tools:js.bzl", _polygerrit_plugin = "polygerrit_plugin") - -polygerrit_plugin = _polygerrit_plugin
diff --git a/tools/bzl/junit.bzl b/tools/bzl/junit.bzl deleted file mode 100644 index 97307bd..0000000 --- a/tools/bzl/junit.bzl +++ /dev/null
@@ -1,6 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//tools:junit.bzl", - _junit_tests = "junit_tests", -) - -junit_tests = _junit_tests
diff --git a/tools/bzl/plugin.bzl b/tools/bzl/plugin.bzl deleted file mode 100644 index ea73147..0000000 --- a/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,12 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _gwt_plugin_deps = "GWT_PLUGIN_DEPS", - _plugin_deps = "PLUGIN_DEPS", - _plugin_test_deps = "PLUGIN_TEST_DEPS", -) - -gerrit_plugin = _gerrit_plugin -GWT_PLUGIN_DEPS = _gwt_plugin_deps -PLUGIN_DEPS = _plugin_deps -PLUGIN_TEST_DEPS = _plugin_test_deps
diff --git a/tools/workspace_status.py b/tools/workspace_status.py deleted file mode 100644 index e7ece80..0000000 --- a/tools/workspace_status.py +++ /dev/null
@@ -1,31 +0,0 @@ -#!/usr/bin/env python - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -from __future__ import print_function -import subprocess -import sys - -CMD = ['git', 'describe', '--always', '--match', 'v[0-9].*', '--dirty'] - - -def revision(): - try: - return subprocess.check_output(CMD).strip().decode("utf-8") - except OSError as err: - print('could not invoke git: %s' % err, file=sys.stderr) - sys.exit(1) - except subprocess.CalledProcessError as err: - print('error using git: %s' % err, file=sys.stderr) - sys.exit(1) - - -print("STABLE_BUILD_VERIFY-STATUS_LABEL %s" % revision())