aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 820d72a5a53dbcf2ef15d095c71823ad518436de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
image: registry.gitlab.com/fdroid/ci-images-client:latest

cache:
  paths:
    - .gradle/wrapper
    - .gradle/caches

stages:
  - build
  - test

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/

build:
  stage: test
  script:
  - ./gradlew lint
  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/