Skip to content

Commit

Permalink
Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Dec 12, 2024
1 parent 08db41a commit 87fac2f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
namespace = "net.mullvad.mullvadvpn"
compileSdk = Versions.compileSdkVersion
buildToolsVersion = Versions.buildToolsVersion
//ndkVersion = Versions.ndkVersion
ndkVersion = Versions.ndkVersion

defaultConfig {
val localProperties = gradleLocalProperties(rootProject.projectDir, providers)
Expand Down
2 changes: 1 addition & 1 deletion android/buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ object Versions {
const val buildToolsVersion = "35.0.0"
const val minSdkVersion = 26
const val targetSdkVersion = 35
const val ndkVersion = "27.1.12297006"
const val ndkVersion = "27.2.12479018"

const val junitJupiter = "5.11.3"
const val junit5Android = "1.6.0"
Expand Down
13 changes: 8 additions & 5 deletions android/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ ARG COMMAND_LINE_TOOLS_VERSION=11076708 \
COMMAND_LINE_TOOLS_SHA256_CHECKSUM=2d2d50857e4eb553af5a6dc3ad507a17adf43d115264b1afc116f95c92e5e258

# NDK and checksum from: https://github.com/android/ndk/wiki#supported-downloads
ARG NDK_VERSION=r27b \
NDK_SHA1_CHECKSUM=6fc476b2e57d7c01ac0c95817746b927035b9749 \
MIN_SDK_VERSION=26
ARG NDK_VERSION_NAME=r27c \
NDK_SHA1_CHECKSUM=090e8083a715fdb1a3e402d0763c388abb03fb4e \
MIN_SDK_VERSION=26 \
NDK_VERSION=27.2.12479018

ENV ANDROID_SDK_ROOT=/opt/android
# ANDROID_HOME is kept for backwards compatibility
ENV ANDROID_HOME=$ANDROID_SDK_ROOT
ENV ANDROID_NDK_HOME=${ANDROID_SDK_ROOT}/android-ndk-${NDK_VERSION}
ENV ANDROID_NDK_HOME=${ANDROID_SDK_ROOT}/ndk/{NDK_VERSION}
ENV NDK_TOOLCHAIN_DIR=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin
ENV GRADLE_USER_HOME=/root/.gradle

Expand Down Expand Up @@ -97,9 +98,11 @@ RUN curl -sfLo /tmp/cmdline-tools.zip https://dl.google.com/android/repository/c
RUN yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager $SDK_VERSION $BUILD_TOOLS_VERSION "platform-tools"

# Install Android NDK
RUN curl -sfLo /tmp/ndk.zip https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux.zip && \
RUN mkdir -p ${ANDROID_SDK_ROOT}/ndk && \
curl -sfLo /tmp/ndk.zip https://dl.google.com/android/repository/android-ndk-${NDK_VERSION_NAME}-linux.zip && \
echo "$NDK_SHA1_CHECKSUM /tmp/ndk.zip" | sha1sum -c && \
unzip -q /tmp/ndk.zip -d $ANDROID_SDK_ROOT && \
mv ${ANDROID_SDK_ROOT}/android-ndk-${NDK_VERSION_NAME} ${ANDROID_NDK_HOME} && \
rm /tmp/ndk.zip

# Apply go patch required for Android
Expand Down

0 comments on commit 87fac2f

Please sign in to comment.