From c3478c335294ade3032b67ba0a967aff8edafa1a Mon Sep 17 00:00:00 2001 From: Nicola Corna Date: Wed, 21 Aug 2019 10:00:45 +0200 Subject: [PATCH] Remove openjdk-7 OpenJDK 7 was previously taken from the Debian experimental repo, but is has been removed. OpenJDK 7 is needed to build LineageOS/Cyanogenmod 11.0-13.0, so support for those version is dropped. --- Dockerfile | 8 ++------ src/build.sh | 17 +++++------------ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e0f838..5a031a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -161,9 +161,6 @@ RUN mkdir -p $USERSCRIPTS_DIR # Install build dependencies ############################ -RUN echo 'deb http://deb.debian.org/debian sid main' >> /etc/apt/sources.list -RUN echo 'deb http://deb.debian.org/debian experimental main' >> /etc/apt/sources.list -COPY apt_preferences /etc/apt/preferences RUN apt-get -qq update RUN apt-get -qqy upgrade @@ -171,9 +168,8 @@ RUN apt-get install -y bc bison bsdmainutils build-essential ccache cgpt cron \ curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick kmod \ lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool \ libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 \ - libxml2-utils lsof lzop maven openjdk-7-jdk openjdk-8-jdk pngcrush \ - procps python rsync schedtool squashfs-tools wget xdelta3 xsltproc yasm \ - zip zlib1g-dev + libxml2-utils lsof lzop maven openjdk-8-jdk pngcrush procps python rsync \ + schedtool squashfs-tools wget xdelta3 xsltproc yasm zip zlib1g-dev RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo diff --git a/src/build.sh b/src/build.sh index 5c92bb7..84604f1 100755 --- a/src/build.sh +++ b/src/build.sh @@ -146,6 +146,11 @@ for branch in ${BRANCH_NAME//,/ }; do fi android_version_major=$(cut -d '.' -f 1 <<< $android_version) + if [ "$android_version_major" -lt "7" ]; then + echo ">> [$(date)] ERROR: $branch requires a JDK version too old (< 8); aborting" + exit 1 + fi + if [ "$android_version_major" -ge "8" ]; then vendor="lineage" else @@ -234,18 +239,6 @@ for branch in ${BRANCH_NAME//,/ }; do sed -i "1s;^;PRODUCT_DEFAULT_DEV_CERTIFICATE := user-keys/releasekey\nPRODUCT_OTA_PUBLIC_KEYS := user-keys/releasekey\nPRODUCT_EXTRA_RECOVERY_KEYS := user-keys/releasekey\n\n;" "vendor/$vendor/config/common.mk" fi - if [ "$android_version_major" -ge "7" ]; then - jdk_version=8 - elif [ "$android_version_major" -ge "5" ]; then - jdk_version=7 - else - echo ">> [$(date)] ERROR: $branch requires a JDK version too old (< 7); aborting" - exit 1 - fi - - echo ">> [$(date)] Using OpenJDK $jdk_version" - update-java-alternatives -s java-1.$jdk_version.0-openjdk-amd64 &> /dev/null - # Prepare the environment echo ">> [$(date)] Preparing build environment" source build/envsetup.sh > /dev/null