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
This commit is contained in:
Tobias Thierer 2017-07-18 16:37:07 +01:00
parent 2aef19528e
commit d61f28bf56
1 changed files with 5 additions and 1 deletions

View File

@ -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)