chore: switch all ANDROID_SDK_ROOT to ANDROID_HOME
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
459ee8b3a4
commit
8f6fdd8b0d
26
Dockerfile
26
Dockerfile
@ -24,27 +24,27 @@ RUN apk add --no-cache binutils ca-certificates curl git openssl unzip --reposit
|
||||
|
||||
WORKDIR /tmp
|
||||
RUN curl -o sdk.zip -s https://dl.google.com/android/repository/sdk-tools-linux-"${VERSION_SDK_TOOLS}".zip
|
||||
RUN unzip ./sdk.zip -d "${ANDROID_SDK_ROOT}"
|
||||
RUN unzip ./sdk.zip -d "${ANDROID_HOME}"
|
||||
RUN rm -f ./sdk.zip
|
||||
|
||||
RUN curl -o tools.zip -s https://dl.google.com/android/repository/commandlinetools-linux-"${VERSION_TOOLS}"_latest.zip \
|
||||
&& mkdir -p "${ANDROID_SDK_ROOT}"/cmdline-tools \
|
||||
&& unzip ./tools.zip -d "${ANDROID_SDK_ROOT}"/cmdline-tools \
|
||||
&& mkdir -p "${ANDROID_HOME}"/cmdline-tools \
|
||||
&& unzip ./tools.zip -d "${ANDROID_HOME}"/cmdline-tools \
|
||||
&& rm -v ./tools.zip
|
||||
|
||||
RUN mkdir -p $ANDROID_SDK_ROOT/licenses/ \
|
||||
&& echo "8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > $ANDROID_SDK_ROOT/licenses/android-sdk-license \
|
||||
&& echo "84831b9409646a918e30573bab4c9c91346d8abd\n504667f4c0de7af1a06de9f4b1727b84351f2910" > $ANDROID_SDK_ROOT/licenses/android-sdk-preview-license \
|
||||
&& yes | ${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses >/dev/null
|
||||
RUN mkdir -p $ANDROID_HOME/licenses/ \
|
||||
&& echo "8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > $ANDROID_HOME/licenses/android-sdk-license \
|
||||
&& echo "84831b9409646a918e30573bab4c9c91346d8abd\n504667f4c0de7af1a06de9f4b1727b84351f2910" > $ANDROID_HOME/licenses/android-sdk-preview-license \
|
||||
&& yes | ${ANDROID_HOME}/cmdline-tools/tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} --licenses >/dev/null
|
||||
|
||||
COPY packages.txt "${ANDROID_SDK_ROOT}"
|
||||
COPY packages.txt "${ANDROID_HOME}"
|
||||
RUN mkdir -p /"$(whoami)"/.android
|
||||
RUN touch /"$(whoami)"/.android/repositories.cfg
|
||||
|
||||
RUN yes | "${ANDROID_SDK_ROOT}"/tools/bin/sdkmanager --verbose --licenses
|
||||
RUN "${ANDROID_SDK_ROOT}"/tools/bin/sdkmanager --verbose --update
|
||||
RUN yes | "${ANDROID_HOME}"/tools/bin/sdkmanager --verbose --licenses
|
||||
RUN "${ANDROID_HOME}"/tools/bin/sdkmanager --verbose --update
|
||||
|
||||
RUN while read -r package; do PACKAGES="${PACKAGES}${package} "; done < "${ANDROID_SDK_ROOT}"/packages.txt && ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager --verbose ${PACKAGES}
|
||||
RUN while read -r package; do PACKAGES="${PACKAGES}${package} "; done < "${ANDROID_HOME}"/packages.txt && ${ANDROID_HOME}/tools/bin/sdkmanager --verbose ${PACKAGES}
|
||||
|
||||
FROM adoptopenjdk/openjdk11:alpine-slim
|
||||
COPY --from=build /tmp/sdk /sdk
|
||||
@ -53,8 +53,8 @@ COPY --from=build /tmp/sdk /sdk
|
||||
ENV JAVA_OPTS='-XX:+UseContainerSupport -XX:MaxRAMPercentage=80'
|
||||
|
||||
ENV ANDROID_HOME "/sdk"
|
||||
ENV ANDROID_SDK_ROOT "${ANDROID_SDK_ROOT}"
|
||||
ENV PATH "$PATH:${ANDROID_SDK_ROOT}/tools:${ANDROID_HOME}/tools"
|
||||
ENV ANDROID_SDK_ROOT "${ANDROID_HOME}"
|
||||
ENV PATH "$PATH:${ANDROID_HOME}/tools"
|
||||
ENV ASDF_VERSION "v0.8.1"
|
||||
ENV GRADLE_VERSION "7.1"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user