diff options
author | Eric Gribkoff <ericgribkoff@google.com> | 2017-07-23 11:54:13 -0700 |
---|---|---|
committer | Eric Gribkoff <ericgribkoff@google.com> | 2017-08-01 09:55:12 -0700 |
commit | 2b7c4ddfcceb828094a4fab5eebeb068152ea75d (patch) | |
tree | 1c5397ccb494e1e835574d519007ac88a69767bd /templates | |
parent | 92bc7f940e5684cbb749f0349c0e69d4e51b8ef8 (diff) |
Install Android SDK tools in Dockerfile
Diffstat (limited to 'templates')
-rw-r--r-- | templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template index 3f5b6cf6ce..1f6755eb51 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template @@ -57,22 +57,24 @@ apt-get update && apt-get install -y google-cloud-sdk && apt-get clean && ${'\\'} gcloud config set component_manager/disable_update_check true - # Download and install grpc-java + # Install Android SDK WORKDIR / - RUN git clone https://github.com/grpc/grpc-java.git - WORKDIR /grpc-java - RUN ./gradlew install + RUN mkdir android-sdk + WORKDIR android-sdk + RUN wget -q https://dl.google.com/android/repository/tools_r25.2.5-linux.zip && ${'\\'} + unzip -qq tools_r25.2.5-linux.zip && ${'\\'} + rm tools_r25.2.5-linux.zip && ${'\\'} + echo y | tools/bin/sdkmanager "platforms;android-22" && ${'\\'} + echo y | tools/bin/sdkmanager "build-tools;25.0.2" && ${'\\'} + echo y | tools/bin/sdkmanager "extras;android;m2repository" && ${'\\'} + echo y | tools/bin/sdkmanager "extras;google;google_play_services" && ${'\\'} + echo y | tools/bin/sdkmanager "extras;google;m2repository" && ${'\\'} + echo y | tools/bin/sdkmanager "patcher;v4" && ${'\\'} + echo y | tools/bin/sdkmanager "platform-tools" + ENV ANDROID_HOME "/android-sdk" - # Setup the Android SDK licenses - ENV ANDROID_HOME "/grpc-java/android-interop-testing/.android" - RUN mkdir -p "<%text>${ANDROID_HOME}</%text>/licenses" - RUN echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "<%text>${ANDROID_HOME}</%text>/licenses/android-sdk-license" - RUN echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "<%text>${ANDROID_HOME}</%text>/licenses/android-sdk-preview-license" - - # Build the Android interop apks - WORKDIR /grpc-java/android-interop-testing - RUN ../gradlew assembleDebug - RUN ../gradlew assembleDebugAndroidTest + # Reset the working directory + WORKDIR / # Define the default command. CMD ["bash"] |