mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
af772762ef
Android NDK is updated from legacy ndk-bundle stuck at unsupported r22b to LTS NDK r23c (23.2.8568313). Since GNU binutils have been removed from NDK since r23 (see https://github.com/android/ndk/wiki/Changelog-r23), ndk-make.sh now uses TARGET_AR=llvm-ar and uses a workaround for `-lgcc` requirement. Android command line tools used in the Dockerfile are updated to build 8512546 Preview APKs now use NDK r23c too.
44 lines
1.3 KiB
Docker
44 lines
1.3 KiB
Docker
FROM docker.io/ubuntu:18.04
|
|
|
|
# Install Android Studio requirements
|
|
# See https://developer.android.com/studio/install#linux
|
|
RUN apt-get update -y \
|
|
&& apt-get install -y --no-install-recommends \
|
|
wget \
|
|
curl \
|
|
unzip \
|
|
openjdk-11-jre \
|
|
file \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG USER=deltachat
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
|
|
RUN groupadd -g $GID -o $USER
|
|
RUN useradd -m -u $UID -g $GID -o $USER
|
|
USER $USER
|
|
|
|
ENV ANDROID_SDK_ROOT /home/${USER}/android-sdk
|
|
RUN mkdir ${ANDROID_SDK_ROOT}
|
|
WORKDIR $ANDROID_SDK_ROOT
|
|
RUN wget -q https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && \
|
|
unzip commandlinetools-linux-8512546_latest.zip && \
|
|
rm commandlinetools-linux-8512546_latest.zip
|
|
|
|
RUN yes | ${ANDROID_SDK_ROOT}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses
|
|
|
|
ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/cmdline-tools/bin
|
|
|
|
# Install NDK manually. Other SDK parts are installed automatically by gradle.
|
|
#
|
|
# NDK version r23c LTS aka 23.2.8568313
|
|
RUN sdkmanager --sdk_root=${ANDROID_SDK_ROOT} 'ndk;23.2.8568313'
|
|
|
|
ENV ANDROID_NDK_ROOT ${ANDROID_SDK_ROOT}/ndk/23.2.8568313
|
|
ENV PATH ${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/:${ANDROID_NDK_ROOT}
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
|
|
ENV PATH ${PATH}:/home/${USER}/.cargo/bin
|