image: java:latest

stages:
  - assemble
  - build
  - javadoc
  - test

cache:
  paths:
    - .gradle/wrapper
    - .gradle/caches
      
assemble:
  stage: assemble
  script:
    - ./gradlew assemble
  artifacts:
    paths:
      - build/libs/*.jar
    expire_in: 1 week
    
build:
  stage: build
  script:
    - ./gradlew build
  artifacts:
    paths:
      - build/libs/*.jar
    expire_in: 1 week

javadoc:
  stage: javadoc
  script:
    - ./gradlew javadoc
  artifacts:
    paths:
      - build/doc/*


test:
  stage: test
  script:
    - ./gradlew check