diff options
author | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-23 09:42:37 +0000 |
---|---|---|
committer | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-23 09:42:37 +0000 |
commit | 850c00913c2b937b5bf649b90cb1d10a8c9ff00a (patch) | |
tree | 2187d18955a5bf18e4b7a96481e1e71ec59550f5 | |
parent | b982d511111aa49f84d5056d31326b1d07658118 (diff) | |
download | chromium_src-850c00913c2b937b5bf649b90cb1d10a8c9ff00a.zip chromium_src-850c00913c2b937b5bf649b90cb1d10a8c9ff00a.tar.gz chromium_src-850c00913c2b937b5bf649b90cb1d10a8c9ff00a.tar.bz2 |
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: svn://svn.chromium.org/chrome/trunk/src@272456 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | build/install-build-deps-android.sh | 74 |
1 files changed, 27 insertions, 47 deletions
diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh index c3375ad..0cad261 100755 --- a/build/install-build-deps-android.sh +++ b/build/install-build-deps-android.sh @@ -47,55 +47,35 @@ 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 - - # 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. - - 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 +sudo apt-get -y install ant1.8 + +# Install openjdk and openjre 7 stuff +sudo apt-get -y install openjdk-7-jre openjdk-7-jdk + +# 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 + # Check that there are the expected javaplugin.so errors for the update + if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \ + /dev/null + then + # Print as warnings all the javaplugin.so errors + echo 'WARNING: java-6-sun has no alternatives for the following plugins:' + grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out 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 \ - >& "${TEMPDIR}"/update-java-alternatives.out + # Check if there are any errors that are not javaplugin.so + if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ + >& /dev/null then - # Check that there are the expected javaplugin.so errors for the update - if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \ - /dev/null - then - # Print as warnings all the javaplugin.so errors - echo 'WARNING: java-6-sun has no alternatives for the following plugins:' - grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out - fi - # Check if there are any errors that are not javaplugin.so - if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ - >& /dev/null - then - # If there are non-javaplugin.so errors, treat as errors and exit - echo 'ERRORS: Failed to update alternatives for java-6-sun:' - grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out - exit 1 - fi + # If there are non-javaplugin.so errors, treat as errors and exit + echo 'ERRORS: Failed to update alternatives for java-6-sun:' + grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out + exit 1 fi fi |