Files
build-containers/Dockerfile.android
Rémi Verschelde 668e36373b Use git tag to checkout stable mono releases
The main reason is that upstream Mono tends to miss some
important files in its tarballs, so Git tags appears to be
a more reliable medium.

Also group RUN commands to reduce the number of intermediate
dependencies.
2019-11-18 21:49:58 +01:00

32 lines
1.3 KiB
Docker

ARG mono_version
FROM godot-mono:${mono_version}
ARG mono_version
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \
dnf clean all && \
mkdir sdk && cd sdk && \
curl -LO https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \
unzip sdk-tools-linux-4333796.zip && \
rm sdk-tools-linux-4333796.zip && \
yes | tools/bin/sdkmanager --licenses && \
tools/bin/sdkmanager ndk-bundle 'build-tools;28.0.3' 'platforms;android-28' 'cmake;3.10.2.4988404'
ENV ANDROID_HOME=/root/sdk/
ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/
RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
cd mono && git submodule update --init && \
patch -p1 < /root/files/patches/fix-mono-android-tkill.diff && \
cd .. && \
git clone https://github.com/godotengine/godot-mono-builds && \
cd godot-mono-builds && \
git checkout 9efec19e6b61fdc7201067cff4dd5b741399ae31 && \
./build_mono_android.py configure --target=all --mono-sources=/root/mono && \
./build_mono_android.py make --target=all --mono-sources=/root/mono && \
cd .. && \
rm -rf /root/mono /root/godot-mono-builds
CMD ['/bin/bash']