2021-06-25 00:43:10 +00:00
|
|
|
FROM gradle:6.7.1-jdk8
|
2019-12-31 13:08:08 +00:00
|
|
|
|
|
|
|
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
|
2020-07-26 08:03:38 +00:00
|
|
|
ENV ANDROID_API_LEVEL android-30
|
2020-12-23 07:48:30 +00:00
|
|
|
ENV ANDROID_BUILD_TOOLS_VERSION 30.0.3
|
2019-12-31 13:08:08 +00:00
|
|
|
ENV ANDROID_HOME /usr/local/android-sdk-linux
|
2021-06-25 00:43:10 +00:00
|
|
|
ENV ANDROID_NDK_VERSION 21.4.7075529
|
2020-07-26 08:03:38 +00:00
|
|
|
ENV ANDROID_VERSION 30
|
2019-12-31 13:08:08 +00:00
|
|
|
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}/
|
|
|
|
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
|
|
|
|
|
|
|
RUN mkdir "$ANDROID_HOME" .android && \
|
|
|
|
cd "$ANDROID_HOME" && \
|
|
|
|
curl -o sdk.zip $ANDROID_SDK_URL && \
|
|
|
|
unzip sdk.zip && \
|
|
|
|
rm sdk.zip
|
|
|
|
|
|
|
|
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses
|
|
|
|
RUN $ANDROID_HOME/tools/bin/sdkmanager --update
|
|
|
|
RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
|
|
|
|
"platforms;android-${ANDROID_VERSION}" \
|
|
|
|
"platform-tools" \
|
|
|
|
"ndk;$ANDROID_NDK_VERSION"
|
|
|
|
ENV PATH ${ANDROID_NDK_HOME}:$PATH
|
|
|
|
ENV PATH ${ANDROID_NDK_HOME}/prebuilt/linux-x86_64/bin/:$PATH
|
2020-04-24 09:21:58 +00:00
|
|
|
|
2021-04-14 01:44:46 +00:00
|
|
|
CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && cp -R /home/source/. /home/gradle && cd /home/gradle && gradle assembleRelease && gradle assembleStandalone && cp -R /home/gradle/TMessagesProj/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && cp -R /home/gradle/TMessagesProj/build/outputs/native-debug-symbols/. /home/source/TMessagesProj/build/outputs/native-debug-symbols
|