Use cmdline-tools and jdk11 in docker build
# base image to build eclair-core
-FROM adoptopenjdk/openjdk11:jdk-11.0.8_10-alpine as ECLAIR_CORE_BUILD
+FROM adoptopenjdk/openjdk11:jdk-11.0.12_7-alpine as ECLAIR_CORE_BUILD
# this is necessary to extract the eclair-core version that we need to clone for the build
COPY ./app/build.gradle .
@@ -35,12 +35,13 @@ FROM ubuntu:20.10
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
-ENV ANDROID_SDK_FILENAME sdk-tools-linux-4333796.zip
-ENV ANDROID_SDK_URL https://dl.google.com/android/repository/${ANDROID_SDK_FILENAME}
+# get latest version number from https://developer.android.com/studio/index.html, bottom section
+ENV ANDROID_CMDLINETOOLS_FILE commandlinetools-linux-7583922_latest.zip
+ENV ANDROID_CMDLINETOOLS_URL https://dl.google.com/android/repository/${ANDROID_CMDLINETOOLS_FILE}
ENV ANDROID_API_LEVELS android-30
ENV ANDROID_BUILD_TOOLS_VERSION 30.0.2
ENV ANDROID_NDK_VERSION 21.3.6528147
-ENV CMAKE_VERSION 3.10.2.4988404
+ENV CMAKE_VERSION 3.18.1
ENV ANDROID_HOME /usr/local/android-sdk
ENV PATH ${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
ENV JAVA_OPTS "-Dprofile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8"
@@ -50,17 +51,20 @@ RUN apt-get update -y && \
apt-get install -y software-properties-common locales && \
apt-get update -y && \
locale-gen en_US.UTF-8 && \
- apt-get install -y openjdk-8-jdk wget git unzip dos2unix
+ apt-get install -y openjdk-11-jdk wget git unzip dos2unix
# fetch and unpack the android sdk
RUN mkdir /usr/local/android-sdk && \
cd /usr/local/android-sdk && \
- wget -q ${ANDROID_SDK_URL} && \
- unzip ${ANDROID_SDK_FILENAME} && \
- rm ${ANDROID_SDK_FILENAME}
+ wget -q ${ANDROID_CMDLINETOOLS_URL} && \
+ unzip ${ANDROID_CMDLINETOOLS_FILE} && \
+ mv cmdline-tools latest && \
+ mkdir cmdline-tools && \
+ mv latest cmdline-tools && \
+ rm ${ANDROID_CMDLINETOOLS_FILE}
# install sdk packages
-RUN echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "cmake;${CMAKE_VERSION}" "ndk;${ANDROID_NDK_VERSION}" "patcher;v4" "platforms;${ANDROID_API_LEVELS}"
+RUN echo y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "cmake;${CMAKE_VERSION}" "ndk;${ANDROID_NDK_VERSION}" "patcher;v4" "platforms;${ANDROID_API_LEVELS}"
# build tor library
RUN git clone https://github.com/ACINQ/Tor_Onion_Proxy_Library && \
