From d61f28bf566221cf77f4e7ff43c045017b2d814a Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Tue, 18 Jul 2017 16:37:07 +0100 Subject: [PATCH] Build: Experimental option to default to -source 1.9 -target 1.9 Enabled via: export EXPERIMENTAL_USE_OPENJDK9=true Other nonempty values of EXPERIMENTAL_USE_OPENJDK9 will allow OpenJDK 9 toolchains, but will still default to -source 1.8 and -target 1.8. Note that -source 1.9 and -target 1.9 does not currently successfully build. Test: Treehugger. Bug: 38177569 Experimental flag to set LOCAL_JAVA_LANGUAGE_VERSION := 1.9 Change-Id: I9eb881b3fbd1806984a132f6da7b5a4cc6612247 --- core/java_common.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/java_common.mk b/core/java_common.mk index 3c9b18f8c..ba00b368c 100644 --- a/core/java_common.mk +++ b/core/java_common.mk @@ -19,7 +19,11 @@ ifeq (,$(LOCAL_JAVA_LANGUAGE_VERSION)) ifneq (,$(filter $(LOCAL_SDK_VERSION), $(private_sdk_versions_without_any_java_18_support))) LOCAL_JAVA_LANGUAGE_VERSION := 1.7 else - LOCAL_JAVA_LANGUAGE_VERSION := 1.8 + ifneq ($(EXPERIMENTAL_USE_OPENJDK9),true) + LOCAL_JAVA_LANGUAGE_VERSION := 1.8 + else + LOCAL_JAVA_LANGUAGE_VERSION := 1.9 + endif endif endif LOCAL_JAVACFLAGS += -source $(LOCAL_JAVA_LANGUAGE_VERSION) -target $(LOCAL_JAVA_LANGUAGE_VERSION)