From a67cfb868f9152cc563b96b32f69808bfead39e7 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 24 Jan 2017 13:38:00 +0900 Subject: [PATCH] GerritLauncher: Remove isBazel method Change-Id: I0390b80ad1fe3dbea886f73ff5cf23fc93861c94 --- .../gerrit/launcher/GerritLauncher.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java b/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java index 5d023c0e4c..b0eabeaddc 100644 --- a/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java +++ b/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java @@ -627,36 +627,6 @@ public final class GerritLauncher { } static String SOURCE_ROOT_RESOURCE = "/gerrit-launcher/workspace-root.txt"; - static String PRIMARY_BUILD_TOOL = ".primary_build_tool"; - - /** returns whether we're running out of a bazel build. */ - public static boolean isBazel() { - Class self = GerritLauncher.class; - URL rootURL = self.getResource(SOURCE_ROOT_RESOURCE); - if (rootURL != null) { - return true; - } - - Path p = null; - try { - p = resolveInSourceRoot("eclipse-out"); - if (!Files.exists(p)) { - p = resolveInSourceRoot("bazel-out"); - } - Path path = p.getParent().resolve(PRIMARY_BUILD_TOOL); - if (Files.exists(path)) { - String content = new String(Files.readAllBytes(path)); - if (content.toLowerCase().contains("bazel")) { - return true; - } - } - } catch (IOException e) { - // Ignore - } - - // Not Bazel then - return false; - } /** * Locate a path in the source tree.