Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a18fb139 authored by Zhao Wei Liew's avatar Zhao Wei Liew
Browse files

build: Allow both OpenJDK and OracleJDK by default

Some users would like to build with Oracle JDK on Linux,
while others would like to build with OpenJDK on Darwin.

CM should build fine with either configuration, so drop
the OpenJDK checks to allow both of them.

Change-Id: I64d7887c2fab4dd301b07d7df0d19f28e97d80ab
parent cbfe900f
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -218,39 +218,6 @@ $(info ************************************************************)
$(error stop)
endif

# Check for the current JDK.
#
# For Java 1.7/1.8, we require OpenJDK on linux and Oracle JDK on Mac OS.
requires_openjdk := false
ifeq ($(BUILD_OS),linux)
requires_openjdk := true
endif


# Check for the current jdk
ifeq ($(requires_openjdk), true)
# The user asked for openjdk, so check that the host
# java version is really openjdk and not some other JDK.
ifeq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
$(info ************************************************************)
$(info You asked for an OpenJDK based build but your version is)
$(info $(java_version_str).)
$(info ************************************************************)
$(error stop)
endif # java version is not OpenJdk
else # if requires_openjdk
ifneq ($(shell echo '$(java_version_str)' | grep -i openjdk),)
$(info ************************************************************)
$(info You are attempting to build with an unsupported JDK.)
$(info $(space))
$(info You use OpenJDK but only Sun/Oracle JDK is supported.)
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
$(info ************************************************************)
$(error stop)
endif # java version is not Sun Oracle JDK
endif # if requires_openjdk

KNOWN_INCOMPATIBLE_JAVAC_VERSIONS := google
incompat_javac := $(foreach v,$(KNOWN_INCOMPATIBLE_JAVAC_VERSIONS),$(findstring $(v),$(javac_version_str)))
ifneq ($(incompat_javac),)