2021-08-31 19:06:39 +00:00
|
|
|
FROM gradle:7.0.2-jdk11
|
2019-12-31 13:08:08 +00:00
|
|
|
|
2021-07-19 15:56:43 +00:00
|
|
|
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip
|
|
|
|
ENV ANDROID_API_LEVEL android-31
|
|
|
|
ENV ANDROID_BUILD_TOOLS_VERSION 31.0.0
|
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
|
2021-07-19 15:56:43 +00:00
|
|
|
ENV ANDROID_VERSION 31
|
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
|
|
|
|
|
2021-07-19 15:56:43 +00:00
|
|
|
RUN yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --licenses
|
|
|
|
RUN $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --update
|
|
|
|
RUN $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "build-tools;30.0.3" \
|
|
|
|
"build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
|
2019-12-31 13:08:08 +00:00
|
|
|
"platforms;android-${ANDROID_VERSION}" \
|
|
|
|
"platform-tools" \
|
|
|
|
"ndk;$ANDROID_NDK_VERSION"
|
2021-07-19 15:56:43 +00:00
|
|
|
RUN cp $ANDROID_HOME/build-tools/30.0.3/dx $ANDROID_HOME/build-tools/31.0.0/dx
|
|
|
|
RUN cp $ANDROID_HOME/build-tools/30.0.3/lib/dx.jar $ANDROID_HOME/build-tools/31.0.0/lib/dx.jar
|
2019-12-31 13:08:08 +00:00
|
|
|
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
|
|
|
|
2022-08-12 15:23:51 +00:00
|
|
|
CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && \
|
|
|
|
mkdir -p /home/gradle/TMessagesProj/build/outputs/bundle && \
|
|
|
|
mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && \
|
|
|
|
cp -R /home/source/. /home/gradle && \
|
|
|
|
cd /home/gradle && \
|
|
|
|
gradle :TMessagesProj_App:bundleBundleAfat_SDK23Release && \
|
|
|
|
gradle :TMessagesProj_App:bundleBundleAfatRelease && \
|
|
|
|
gradle :TMessagesProj_App:assembleAfatStandalone && \
|
|
|
|
gradle :TMessagesProj_App:assembleAfatRelease && \
|
|
|
|
gradle :TMessagesProj_AppHuawei:assembleAfatRelease && \
|
|
|
|
cp -R /home/gradle/TMessagesProj_App/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && \
|
|
|
|
cp -R /home/gradle/TMessagesProj_AppHuawei/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && \
|
|
|
|
cp -R /home/gradle/TMessagesProj_App/build/outputs/bundle/. /home/source/TMessagesProj/build/outputs/bundle && \
|
|
|
|
cp -R /home/gradle/TMessagesProj_App/build/outputs/native-debug-symbols/. /home/source/TMessagesProj/build/outputs/native-debug-symbols
|