Get rid of references to .primary_build_tool

This was introduced to support both buck and bazel build tools, and
is no longer necessary since we completely dropped buck in favor of
bazel.

Change-Id: I5fc96bf1fc27f20180737fea954e150070e5302f
This commit is contained in:
David Pursehouse
2017-03-14 21:36:28 +09:00
parent c087c37487
commit 34b59f0ad3
3 changed files with 1 additions and 18 deletions

1
.gitignore vendored
View File

@@ -8,7 +8,6 @@
*~ *~
.DS_Store .DS_Store
.gwt_work_dir .gwt_work_dir
.primary_build_tool
/.apt_generated /.apt_generated
/.buckd /.buckd
/.classpath /.classpath

View File

@@ -14,11 +14,8 @@
package com.google.gerrit.httpd.raw; package com.google.gerrit.httpd.raw;
import static com.google.common.base.MoreObjects.firstNonNull;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Properties;
public class BazelBuild extends BuildSystem { public class BazelBuild extends BuildSystem {
public BazelBuild(Path sourceRoot) { public BazelBuild(Path sourceRoot) {
@@ -27,13 +24,7 @@ public class BazelBuild extends BuildSystem {
@Override @Override
protected ProcessBuilder newBuildProcess(Label label) throws IOException { protected ProcessBuilder newBuildProcess(Label label) throws IOException {
Properties properties = loadBuildProperties(sourceRoot.resolve(".primary_build_tool")); return new ProcessBuilder("bazel", "build", label.fullName());
String bazel = firstNonNull(properties.getProperty("bazel"), "bazel");
ProcessBuilder proc = new ProcessBuilder(bazel, "build", label.fullName());
if (properties.containsKey("PATH")) {
proc.environment().put("PATH", properties.getProperty("PATH"));
}
return proc;
} }
@Override @Override

View File

@@ -56,12 +56,6 @@ args, _ = opts.parse_args()
def retrieve_ext_location(): def retrieve_ext_location():
return check_output(['bazel', 'info', 'output_base']).strip() return check_output(['bazel', 'info', 'output_base']).strip()
def gen_primary_build_tool():
bazel = check_output(['which', 'bazel']).strip()
with open(path.join(ROOT, ".primary_build_tool"), 'w') as fd:
fd.write("bazel=%s\n" % bazel)
fd.write("PATH=%s\n" % environ["PATH"])
def _query_classpath(target): def _query_classpath(target):
deps = [] deps = []
t = cp_targets[target] t = cp_targets[target]
@@ -264,7 +258,6 @@ try:
gen_project(args.project_name) gen_project(args.project_name)
gen_classpath(ext_location) gen_classpath(ext_location)
gen_factorypath(ext_location) gen_factorypath(ext_location)
gen_primary_build_tool()
# TODO(davido): Remove this when GWT gone # TODO(davido): Remove this when GWT gone
gwt_working_dir = ".gwt_work_dir" gwt_working_dir = ".gwt_work_dir"