Skip to content
Snippets Groups Projects
Commit 2924d3c4 authored by Jan Grewe's avatar Jan Grewe
Browse files

Update for SDK 24

parents c1d65573 57d1b546
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@
FROM ubuntu:16.04
MAINTAINER Jan Grewe <jan@faked.org>
ENV VERSION_SDK_TOOLS "25.1.7"
ENV VERSION_SDK_TOOLS "25.2.2"
ENV VERSION_BUILD_TOOLS "24.0.2"
ENV VERSION_TARGET_SDK "24"
......@@ -29,7 +29,7 @@ RUN apt-get -qq update && \
lib32ncurses5 \
lib32z1 \
unzip \
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/*
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN rm -f /etc/ssl/certs/java/cacerts; \
/var/lib/dpkg/info/ca-certificates-java.postinst configure
......@@ -38,4 +38,8 @@ ADD http://dl.google.com/android/repository/tools_r${VERSION_SDK_TOOLS}-linux.zi
RUN unzip /tools.zip -d /sdk && \
rm -v /tools.zip
RUN mkdir -p $ANDROID_HOME/licenses/ \
&& echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license \
&& echo "84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license
RUN (while [ 1 ]; do sleep 5; echo y; done) | ${ANDROID_HOME}/tools/android update sdk -u -a -t ${SDK_PACKAGES}
# gitlab-ci-android
This Docker image contains the Android SDK and most common packages necessary for building Android apps in a CI tool like GitLab CI. Make sure your CI environment's caching works as expected, this greatly improves the build time, especially if you use multiple build jobs.
A `.gitlab-ci.yml` with caching of your project's dependencies would look like this:
```
image: registry.magic-technik.de/gitlab-ci/android
stages:
- build
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
build:
stage: build
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/apk/app-debug.apk
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment