Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a1544ab authored by Colin Cross's avatar Colin Cross
Browse files

Make JAVA_HOME absolute inside build

Export JAVA_HOME as an absolute path to commands running inside
a build.

Should fix errors invoking gradle from inside a build:
ERROR: JAVA_HOME is set to an invalid directory: prebuilts/jdk/jdk8/linux-x86
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Test: treehugger
Change-Id: I16e4482b2d74ede0843715be3b08c65ce33cf403
parent e97e6935
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ common_jdk_flags := -Xmaxerrs 9999999

ANDROID_JAVA_HOME := prebuilts/jdk/jdk8/$(HOST_PREBUILT_TAG)
ANDROID_JAVA_TOOLCHAIN := $(ANDROID_JAVA_HOME)/bin
export JAVA_HOME := $(ANDROID_JAVA_HOME)
export JAVA_HOME := $(abspath $(ANDROID_JAVA_HOME))

# Use the indexer wrapper to index the codebase instead of the javac compiler
ifeq ($(ALTERNATE_JAVAC),)