From 73ba79702ef72167e683998c2a9dc2ea0934833c Mon Sep 17 00:00:00 2001 From: Sorin Basca Date: Fri, 31 May 2024 11:07:14 +0100 Subject: [PATCH] Allow experimental use of Java 21 by default in makefiles Bug: 342332820 Test: EXPERIMENTAL_TARGET_JAVA_VERSION_21=true m javac-check lint-check dist Change-Id: I510746d617c49a0423f1ab0171a3474b181c3875 --- core/java_common.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/java_common.mk b/core/java_common.mk index 65feb1532e..a21f062029 100644 --- a/core/java_common.mk +++ b/core/java_common.mk @@ -32,6 +32,8 @@ ifeq (,$(LOCAL_JAVA_LANGUAGE_VERSION)) else ifneq (,$(LOCAL_SDK_VERSION)$(TARGET_BUILD_USE_PREBUILT_SDKS)) # TODO(ccross): allow 1.9 for current and unbundled once we have SDK system modules LOCAL_JAVA_LANGUAGE_VERSION := 1.8 + else ifeq ($(EXPERIMENTAL_TARGET_JAVA_VERSION_21),true) + LOCAL_JAVA_LANGUAGE_VERSION := 21 else LOCAL_JAVA_LANGUAGE_VERSION := 17 endif