forked from godotengine/build-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.android
31 lines (26 loc) · 1.43 KB
/
Dockerfile.android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ARG img_version
FROM godot-mono:${img_version}
ARG mono_version
ENV ANDROID_SDK_ROOT=/root/sdk
ENV ANDROID_NDK_VERSION=21.4.7075529
ENV ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/${ANDROID_NDK_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 \
java-1.8.0-openjdk-devel ncurses-compat-libs && \
mkdir -p sdk && cd sdk && \
curl -LO https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip && \
unzip commandlinetools-linux-6858069_latest.zip && \
rm commandlinetools-linux-6858069_latest.zip && \
yes | cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" --licenses && \
cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" "ndk;${ANDROID_NDK_VERSION}" 'cmdline-tools;latest' 'build-tools;30.0.1' 'platforms;android-29' 'cmake;3.10.2.4988404'
RUN cp -a /root/files/${mono_version} /root && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
cd /root/${mono_version}/godot-mono-builds && \
python3 android.py configure -j --target=all-runtime && \
python3 android.py make -j --target=all-runtime && \
cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/${mono_version}/godot-mono-builds && \
python3 bcl.py make -j --product=android && \
cd /root && \
rm -rf /root/${mono_version}
CMD /bin/bash