From 5f36a62622840e121a5276acbdfa8d548744d4e5 Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Fri, 17 Nov 2017 14:06:51 +0000 Subject: [PATCH] Build with OpenJDK 9 -target 1.8 by default except for errorprone. Before this CL topic, the build toolchain for .java source files used OpenJDK 8, targeting 1.8 (v52 class files) by default. This CL topic switches the default to OpenJDK 9, but still targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE is set to true, then the default remains OpenJDK 8. Code in the Android platform should generally be unaffected, but if host tools that are now compiled and run using OpenJDK 9 are causing problems for your team, then let me know. To manually switch back to the old behavior for now (continue using OpenJDK 8), run this command in your shell: export EXPERIMENTAL_USE_OPENJDK9=false Bug: 69449021 Test: Treehugger Test: "make core-oj", checked that compilation now uses OpenJDK 9 javac -target 1.8 Test: Checked that this is still compiled using OpenJDK 8. export EXPERIMENTAL_USE_OPENJDK9=false make core-oj Change-Id: Iadae20d25e37d2cf0a89918a54af51fab1a4f01d --- core/config.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/config.mk b/core/config.mk index 5fd299335..d4dae70f7 100644 --- a/core/config.mk +++ b/core/config.mk @@ -690,7 +690,11 @@ ANDROID_MANIFEST_MERGER := $(JAVA) -classpath prebuilts/devtools/tools/lib/manif COLUMN:= column ifeq ($(EXPERIMENTAL_USE_OPENJDK9),) +ifeq ($(RUN_ERROR_PRONE),true) USE_OPENJDK9 := +else +USE_OPENJDK9 := true +endif TARGET_OPENJDK9 := else ifeq ($(EXPERIMENTAL_USE_OPENJDK9),false) USE_OPENJDK9 :=