From 3d8bf2994c4e8e17500f79acf9b9decb8adc40af Mon Sep 17 00:00:00 2001 From: Lee Campbell Date: Thu, 28 Jan 2016 16:12:01 -0800 Subject: [PATCH] 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 --- core/main.mk | 5 +++++ tools/signapk/Android.mk | 2 ++ 2 files changed, 7 insertions(+) diff --git a/core/main.mk b/core/main.mk index 14594e7bd..549c82589 100644 --- a/core/main.mk +++ b/core/main.mk @@ -57,6 +57,9 @@ TOPDIR := 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 @@ $(warning ************************************************************) $(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 @@ $(info ************************************************************) $(error stop) endif +endif # if JAVA_NOT_REQUIRED ifndef BUILD_EMULATOR # Emulator binaries are now provided under prebuilts/android-emulator/ diff --git a/tools/signapk/Android.mk b/tools/signapk/Android.mk index c2cf572b2..ac217c7e4 100644 --- a/tools/signapk/Android.mk +++ b/tools/signapk/Android.mk @@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := libconscrypt_openjdk_jni include $(BUILD_HOST_JAVA_LIBRARY) ifeq ($(TARGET_BUILD_APPS),) +ifeq ($(BRILLO),) # The post-build signing tools need signapk.jar and its shared libraries, # but we don't need this if we're just doing unbundled apps. my_dist_files := $(LOCAL_INSTALLED_MODULE) \ @@ -34,3 +35,4 @@ my_dist_files := $(LOCAL_INSTALLED_MODULE) \ $(call dist-for-goals,droidcore,$(my_dist_files)) my_dist_files := endif +endif -- 2.11.0