image: registry.gitlab.com/fdroid/ci-images-base:latest

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

before_script:
  - set -e
  - export GRADLE_USER_HOME=$PWD/.gradle

test:
  script:
    - ./gradlew animalSnifferMain animalSnifferTest
    - ./gradlew test

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/
