aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMartin/Geno <geno+dev@fireorbit.de>2018-11-08 21:49:30 +0100
committerMartin/Geno <geno+dev@fireorbit.de>2018-11-08 22:38:26 +0100
commita59518ced9ef11b5b0fc0f8ee5926c1966a0ee23 (patch)
tree8f27ce8dd27359c2801117241f3483aa8bcee421 /.gitlab-ci.yml
parentdccfc8c5cb926f4f5564a3239accdd7900df4f26 (diff)
add .gitlab-ci.yml
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..020210902
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,28 @@
+image: registry.gitlab.com/fdroid/ci-images-client:latest
+
+cache:
+ paths:
+ - .gradle/wrapper
+ - .gradle/caches
+
+stages:
+ - build
+
+before_script:
+ - export GRADLE_USER_HOME=$PWD/.gradle
+ - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle`
+ - echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
+
+
+build:
+ stage: build
+ script:
+ - ./gradlew assembleStandard
+ artifacts:
+ paths:
+ - build/outputs/
+
+after_script:
+ # this file changes every time but should not be cached
+ - rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
+ - rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/