Remove Java 6 build support
Change-Id: I9754844af58e3f81d7eb9dae286128d17a2cb56c
diff --git a/core/combo/javac.mk b/core/combo/javac.mk
index 7f91aa9..fb43ea4 100644
--- a/core/combo/javac.mk
+++ b/core/combo/javac.mk
@@ -9,11 +9,7 @@
# COMMON_JAVAC -- Java compiler command with common arguments
#
-ifneq ($(LEGACY_USE_JAVA6),)
-common_jdk_flags := -target 1.5 -Xmaxerrs 9999999
-else
common_jdk_flags := -source 1.7 -target 1.7 -Xmaxerrs 9999999
-endif
# Use the indexer wrapper to index the codebase instead of the javac compiler
ifeq ($(ALTERNATE_JAVAC),)
diff --git a/core/config.mk b/core/config.mk
index d0743f4..c030d22 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -418,17 +418,7 @@
COLUMN:= column
endif
-ifeq ($(HOST_OS),darwin)
-ifeq ($(LEGACY_USE_JAVA6),)
HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
-else
-# Deliberately set to blank for Java 6 installations on MacOS. These
-# versions allegedly use a non-standard directory structure.
-HOST_JDK_TOOLS_JAR :=
-endif
-else
-HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
-endif
ifneq ($(HOST_JDK_TOOLS_JAR),)
ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
diff --git a/core/main.mk b/core/main.mk
index 1958a16..b628c8f 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -139,19 +139,11 @@
java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1)
javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1)
-# Check for the correct version of java, should be 1.7 by
-# default, and 1.6 if LEGACY_USE_JAVA6 is set.
-ifeq ($(LEGACY_USE_JAVA6),)
+# Check for the correct version of java.
required_version := "1.7.x"
required_javac_version := "1.7"
java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]')
javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]')
-else # if LEGACY_USE_JAVA6
-required_version := "1.6.x"
-required_javac_version := "1.6"
-java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.6[\. "$$]')
-javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.6[\. "$$]')
-endif # if LEGACY_USE_JAVA6
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
@@ -170,13 +162,10 @@
# Check for the current JDK.
#
# For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS.
-# For Java 1.6, we require Oracle for all host OSes.
requires_openjdk := false
-ifeq ($(LEGACY_USE_JAVA6),)
ifeq ($(HOST_OS), linux)
requires_openjdk := true
endif
-endif
# Check for the current jdk
diff --git a/envsetup.sh b/envsetup.sh
index c29b788..18bc972 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1390,7 +1390,7 @@
\cd $T/$pathname
}
-# Force JAVA_HOME to point to java 1.7 or java 1.6 if it isn't already set.
+# Force JAVA_HOME to point to java 1.7 if it isn't already set.
#
# Note that the MacOS path for java 1.7 includes a minor revision number (sigh).
# For some reason, installing the JDK doesn't make it show up in the
@@ -1407,25 +1407,14 @@
fi
if [ ! "$JAVA_HOME" ]; then
- if [ -n "$LEGACY_USE_JAVA6" ]; then
- case `uname -s` in
- Darwin)
- export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
- ;;
- *)
- export JAVA_HOME=/usr/lib/jvm/java-6-sun
- ;;
- esac
- else
- case `uname -s` in
- Darwin)
- export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
- ;;
- *)
- export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
- ;;
- esac
- fi
+ case `uname -s` in
+ Darwin)
+ export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
+ ;;
+ *)
+ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+ ;;
+ esac
# Keep track of the fact that we set JAVA_HOME ourselves, so that
# we can change it on the next envsetup.sh, if required.