BuildAndroid-aarch64.dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM ubuntu:noble
  2. WORKDIR /usr/local/app
  3. RUN apt-get update && apt-get install -y openjdk-17-jdk python3 pipx cmake ccache ninja-build wget git xz-utils
  4. ENV PIPX_HOME="/opt/pipx"
  5. ENV PIPX_BIN_DIR="/usr/local/bin"
  6. ENV PIPX_MAN_DIR="/usr/local/share/man"
  7. RUN pipx install 'conan'
  8. RUN pipx install 'sdkmanager'
  9. RUN conan profile detect
  10. ENV DEPS_VERSION="2025-08-24"
  11. ENV DEPS="dependencies-android-arm64-v8a.tgz"
  12. RUN wget --https-only --max-redirect=20 https://github.com/vcmi/vcmi-dependencies/releases/download/$DEPS_VERSION/$DEPS
  13. RUN conan cache restore $DEPS
  14. RUN rm $DEPS
  15. ENV JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
  16. ENV ANDROID_HOME="/usr/lib/android-sdk"
  17. ENV GRADLE_USER_HOME="/vcmi/.cache/gradle"
  18. ENV NDK_VERSION="25.2.9519653"
  19. RUN sdkmanager --install "platform-tools" "platforms;android-35" "ndk;$NDK_VERSION"
  20. RUN yes | sdkmanager --licenses
  21. CMD ["sh", "-c", " \
  22. # switch to mounted dir
  23. cd /vcmi ; \
  24. # prepare Gradle config
  25. mkdir -p $GRADLE_USER_HOME ; \
  26. echo android.bundle.enableUncompressedNativeLibs=true > $GRADLE_USER_HOME/gradle.properties ; \
  27. # generate CMake toolchain
  28. conan install . --output-folder=conan-generated --build=never --profile=dependencies/conan_profiles/android-64 --profile=dependencies/conan_profiles/base/android-system -c tools.android:ndk_path=$ANDROID_HOME/ndk/$NDK_VERSION && \
  29. # build
  30. cmake --preset android-daily-release && \
  31. cmake --build --preset android-daily-release \
  32. "]