diff --git a/Dockerfile b/Dockerfile index 7da7cea812a2e5b7f08203ea10115c305b67e19b..949882341d369c668863f3379fd781c07bd5681d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -152,7 +152,7 @@ RUN apt-get install -y bc bison bsdmainutils build-essential ccache cgpt clang c curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick kmod \ lib32ncurses5-dev libncurses5 lib32readline-dev lib32z1-dev libtinfo5 liblz4-tool \ libncurses5-dev libsdl1.2-dev libssl-dev libxml2 \ - libxml2-utils lsof lzop maven pngcrush \ + libxml2-utils lsof lzop maven openjdk-8-jdk pngcrush \ procps python python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev @@ -166,6 +166,12 @@ RUN add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ RUN apt-get -qq update && apt-get install -y adoptopenjdk-8-hotspot=8u282-b08-3 RUN update-alternatives --set java /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java + +# Fix jack server SSL issue during build for openjdk (adoptopenjdk won't work for nougat and oreo) +RUN perl -0777 -i -p -e 's/(jdk.tls.disabledAlgorithms=.*?), TLSv1, TLSv1\.1/$1/g' \ + /etc/java-8-openjdk/security/java.security + + # Set the work directory ######################## WORKDIR $SRC_DIR diff --git a/src/build.sh b/src/build.sh index 677dd71b5346a159526610fb137524c308c49c18..912a40cd596eebad318bebf1931414902a240313 100755 --- a/src/build.sh +++ b/src/build.sh @@ -33,6 +33,7 @@ fi sync_successful=true +use_openjdk_from_ubuntu=false branch_dir=$(sed 's/.*-\([a-zA-Z]*\)$/\1/' <<< "${BRANCH_NAME}") branch_dir=${branch_dir^^} @@ -43,10 +44,12 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then vendor="cm" themuppets_branch="cm-14.1" android_version="7.1.2" + use_openjdk_from_ubuntu=true ;; *oreo*) themuppets_branch="lineage-15.1" android_version="8.1" + use_openjdk_from_ubuntu=true ;; *pie*) themuppets_branch="lineage-16.0" @@ -193,6 +196,10 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then echo ">> [$(date)] No build for ${DEVICE}" fi + if [ "$use_openjdk_from_ubuntu" = true ]; then + update-java-alternatives -s java-1.8.0-openjdk-amd64 + fi + # Start the build echo ">> [$(date)] Starting build for ${DEVICE}, ${BRANCH_NAME} branch" build_successful=false