gitlab-ci: force HTTP with sdkmanager to make for better caching

Caching proxies are a lot easier with plain HTTP.  HTTPS is not needed here
since these are only CI builds.  The worst an attacker could do it annoy us
parent 97ad4ddc
......@@ -12,6 +12,7 @@ stages:
before_script:
- export GRADLE_USER_HOME=$PWD/.gradle
- export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle`
- alias sdkmanager="sdkmanager --no_https"
- echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
.test-template: &test-template
......@@ -59,7 +60,13 @@ errorprone:
.connected-template: &connected-template
script:
- ./gradlew assembleDebug
- echo y | sdkmanager "platforms;android-$AVD_SDK" > /dev/null
- export AVD_SDK=`echo $CI_JOB_NAME | awk '{print $2}'`
- export AVD_TAG=`echo $CI_JOB_NAME | awk '{print $3}'`
- export AVD_ARCH=`echo $CI_JOB_NAME | awk '{print $4}'`
- export AVD_PACKAGE="system-images;android-${AVD_SDK};${AVD_TAG};${AVD_ARCH}"
- echo $AVD_PACKAGE
- alias sdkmanager
- echo y | sdkmanager "emulator" "platforms;android-$AVD_SDK" > /dev/null
- if ! avdmanager list avd | grep "Name. avd$AVD_SDK$"; then
rm -rf ~/.android/avd $ANDROID_HOME/system-images;
echo y | sdkmanager "$AVD_PACKAGE" > /dev/null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment