Skip to content

Commit

Permalink
added android tools installation
Browse files Browse the repository at this point in the history
  • Loading branch information
sedind committed Sep 6, 2020
1 parent a3e3bbf commit 3ade5ff
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,44 @@ ARG UNAME=runner
ARG UID=1000
ARG GID=1000

# Setup Android SDK/JDK Environment Variables
ENV UNITY_INSTALL_LOCATION /opt/Unity
ARG ANDROID_NDK=http://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip
ARG ANDROID_JDK
ARG ANDROID_SDK_BUILDTOOLS=http://dl.google.com/android/repository/build-tools_r28-linux.zip
ARG ANDROID_SDK_SDKTOOLS=http://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
ARG ANDROID_SDK_PLATFORMTOOLS=http://dl.google.com/android/repository/platform-tools_r28.0.0-linux.zip
ARG ANDROID_SDK_PLATFORM=http://dl.google.com/android/repository/platform-28_r06.zip

ENV ANDROID_INSTALL_LOCATION ${UNITY_INSTALL_LOCATION}/Editor/Data/PlaybackEngines/AndroidPlayer
ENV ANDROID_HOME ${ANDROID_INSTALL_LOCATION}/SDK
ENV ANDROID_NDK_HOME ${ANDROID_INSTALL_LOCATION}/NDK

RUN mkdir -p ${ANDROID_INSTALL_LOCATION}

RUN echo "Android Platform tools Install" \
&& wget -q ${ANDROID_SDK_PLATFORMTOOLS} -O /tmp/platform-tools.zip \
&& unzip -q /tmp/platform-tools.zip -d ${ANDROID_HOME} \
&& wget -q ${ANDROID_SDK_BUILDTOOLS} -O /tmp/build-tools.zip \
&& unzip -q /tmp/build-tools.zip -d ${ANDROID_HOME}/build-tools \
&& mv ${ANDROID_HOME}/build-tools/android-9 ${ANDROID_HOME}/build-tools/28.0.0 \
&& wget -q ${ANDROID_SDK_PLATFORM} -O /tmp/platform.zip \
&& unzip -q /tmp/platform.zip -d ${ANDROID_HOME}/platforms \
&& mv ${ANDROID_HOME}/platforms/android-9 ${ANDROID_HOME}/platforms/android-28 \
&& wget -q ${ANDROID_NDK} -O /tmp/android-ndk.zip \
&& unzip -q /tmp/android-ndk.zip -d ${ANDROID_NDK_HOME} \
&& mv ${ANDROID_NDK_HOME}/*/* ${ANDROID_NDK_HOME} \
&& yes | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses \
&& chmod -R 777 ${ANDROID_INSTALL_LOCATION} \
&& ls -ahl ${ANDROID_HOME} \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*



RUN chown $UID:$GID -R /opt/Unity
RUN chmod 755 /opt/Unity

Expand Down

0 comments on commit 3ade5ff

Please sign in to comment.