Change install deps android to always install OpenJDK 7.
L bots need OpenJDK 7 and OpenJDK 7 works when building with older SDK's. Also, this removes the awkward way we had to install Oracle's JDK. BUG=353155 Review URL: https://codereview.chromium.org/294093006 git-svn-id: http://src.chromium.org/svn/trunk/src/build@272456 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
902f543dc7
Коммит
837b5cf9a4
|
@ -47,38 +47,19 @@ sudo apt-get -y install checkstyle lighttpd python-pexpect xvfb x11-utils
|
|||
# Few binaries in the Android SDK require 32-bit libraries on the host.
|
||||
sudo apt-get -y install lib32z1 g++-multilib
|
||||
|
||||
if [ $(/usr/bin/lsb_release -r -s | cut -d"." -f1) -ge 12 ]; then
|
||||
# Ubuntu >= 12.x
|
||||
sudo apt-get -y install ant
|
||||
sudo apt-get -y install ant1.8
|
||||
|
||||
# Java can not be installed via ppa on Ubuntu 12.04+ so we'll
|
||||
# simply check to see if it has been setup properly -- if not
|
||||
# let the user know.
|
||||
# Install openjdk and openjre 7 stuff
|
||||
sudo apt-get -y install openjdk-7-jre openjdk-7-jdk
|
||||
|
||||
if ! java -version 2>&1 | grep -q "Java(TM)"; then
|
||||
echo "****************************************************************"
|
||||
echo "You need to install the Oracle Java SDK from http://goo.gl/uPRSq"
|
||||
echo "and configure it as the default command-line Java environment."
|
||||
echo "****************************************************************"
|
||||
exit
|
||||
fi
|
||||
|
||||
else
|
||||
# Ubuntu 10.x
|
||||
|
||||
sudo apt-get -y install ant1.8
|
||||
|
||||
# Install sun-java6 stuff
|
||||
sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk
|
||||
|
||||
# Switch version of Java to java-6-sun
|
||||
# Sun's java is missing certain Java plugins (e.g. for firefox, mozilla).
|
||||
# These are not required to build, and thus are treated only as warnings.
|
||||
# Any errors in updating java alternatives which are not '*-javaplugin.so'
|
||||
# will cause errors and stop the script from completing successfully.
|
||||
if ! sudo update-java-alternatives -s java-6-sun \
|
||||
# Switch version of Java to openjdk 7.
|
||||
# Some Java plugins (e.g. for firefox, mozilla) are not required to build, and
|
||||
# thus are treated only as warnings. Any errors in updating java alternatives
|
||||
# which are not '*-javaplugin.so' will cause errors and stop the script from
|
||||
# completing successfully.
|
||||
if ! sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 \
|
||||
>& "${TEMPDIR}"/update-java-alternatives.out
|
||||
then
|
||||
then
|
||||
# Check that there are the expected javaplugin.so errors for the update
|
||||
if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \
|
||||
/dev/null
|
||||
|
@ -96,7 +77,6 @@ else
|
|||
grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "install-build-deps-android.sh complete."
|
||||
|
|
Загрузка…
Ссылка в новой задаче