如何使用cli Android sdkmanager获取最新的构建工具版本?

时间:2017-11-28 09:38:28

标签: android dockerfile android-sdk-manager

我尝试使用Docker自动化构建过程。

我已经硬编码ANDROID_BUILD_TOOLS_VERSIONsdkmanager但我希望始终获得最新版本以将其传递给FROM ubuntu:16.04 # ANDROID SDK DOCKER IMAGE # ===================================================================== # # HARD ENV VERSIONS # --------------------------------------------------------------------- # ENV ANDROID_API_LEVELS android-26 ENV ANDROID_BUILD_TOOLS_VERSION 26.0.2 ENV ANDROID_HOME /opt/android-sdk ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools # REQUIREMENTS # --------------------------------------------------------------------- # # support multiarch: i386 architecture # install Java # install essential tools # install Qt RUN dpkg --add-architecture i386 && \ apt-get update -y && \ apt-get install -y libncurses5:i386 libc6:i386 libstdc++6:i386 lib32gcc1 lib32ncurses5 lib32z1 zlib1g:i386 && \ apt-get install -y --no-install-recommends openjdk-8-jdk && \ apt-get install -y git wget zip curl && \ apt-get install -y qt5-default # ANDROID # --------------------------------------------------------------------- # # install latest android sdk RUN ANDROID_SDK_URL=$( \ curl -s https://developer.android.com/studio/index.html | \ grep 'https://dl.google.com/android/repository/sdk-tools-linux-[0-9]*[.zip]' | \ head -n 1 | \ cut -d '"' -f 2 \ ) && \ mkdir -p ${ANDROID_HOME} && cd ${ANDROID_HOME} && \ wget -q ${ANDROID_SDK_URL} && \ unzip *tools*linux*.zip && \ rm *tools*linux*.zip # install Android modules RUN sdkmanager "platform-tools" "platforms;${ANDROID_API_LEVELS}" "build-tools;{$ANDROID_BUILD_TOOLS_VERSION}" RUN sdkmanager "extras;android;m2repository" "extras;google;m2repository" "extras;google;google_play_services" RUN sdkmanager "extras;google;webdriver" 可执行文件。

build-tools

如何获取最新的platformsid val flag 1 1.2 0 1 1.5 0 版本?

0 个答案:

没有答案