Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Commit 5c2ba57

Browse files
committed
Extract android components to its own script
1 parent d08f7e7 commit 5c2ba57

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212

1313
android:
1414
components:
15-
- $(if [ $TEST_SUITE == "instrumentation" ]; then echo "tools,platform-tools,tools,build-tools-26.0.1,android-22,android-26,extra-google-google_play_services,extra-google-m2repository,extra-android-m2repository,addon-google_apis-google-24,sys-img-armeabi-v7a-android-22"; fi)
15+
- $(if [ $TEST_SUITE == "instrumentation" ]; then ./.travisAndroidComponents.sh; fi)
1616

1717
before_install:
1818
- if [ $TEST_SUITE == "unit" ]; then

.travisAndroidComponents.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# Read the BUILD_TOOL_VERSION and COMPILE_SDK_VERSION
4+
BUILD_TOOLS_VERSION=$(cat build.gradle | grep "BUILD_TOOLS_VERSION*" | sed -e "s/^.*'\(.*\)'/\1/")
5+
COMPILE_SDK_VERSION=$(cat build.gradle | grep "COMPILE_SDK_VERSION*" | sed -e "s/^.*= \(.*\)$/\1/")
6+
7+
# Echo every componnent we need to install and replace the BUILD_TOOLS_VERSION and COMPILE_SDK_VERSION
8+
echo "tools,platform-tools,tools,build-tools-$BUILD_TOOLS_VERSION,android-22,android-$COMPILE_SDK_VERSION,extra-google-google_play_services,extra-google-m2repository,extra-android-m2repository,addon-google_apis-google-24,sys-img-armeabi-v7a-android-22"

0 commit comments

Comments
 (0)