brillo: Remove dependency on java for Brillo
Brillo does not require Java. Add a JAVA_NOT_REQUIRED
flag to the build system to make the jdk requirment optional
Also don't build signapk for Brillo
BUG: 25281898
Change-Id: I31e68cc7d076bf6c234699c77c0ea1ea428be4f5
diff --git a/core/main.mk b/core/main.mk
index 14594e7..549c825 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -57,6 +57,9 @@
BUILD_SYSTEM := $(TOPDIR)build/core
+# Ensure JAVA_NOT_REQUIRED is not set externally.
+JAVA_NOT_REQUIRED := false
+
# This is the default target. It must be the first declared target.
.PHONY: droid
DEFAULT_GOAL := droid
@@ -177,6 +180,7 @@
$(error Directory names containing spaces not supported)
endif
+ifeq ($(JAVA_NOT_REQUIRED), false)
java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1)
javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1)
@@ -256,6 +260,7 @@
$(error stop)
endif
+endif # if JAVA_NOT_REQUIRED
ifndef BUILD_EMULATOR
# Emulator binaries are now provided under prebuilts/android-emulator/