language: java
jdk:
  - oraclejdk8
os:
  - linux
dist: trusty
before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  directories:
    - "$HOME/.gradle/caches/"
    - "$HOME/.gradle/wrapper/"
script:
  - ./gradlew build
  - ./gradlew zipDist
deploy:
  provider: releases
  api_key: $GITHUB_TOKEN
  file_glob: true
  file: dist/*.zip
  skip_cleanup: true
  on:
    tags: true
    branch: master

language: java
jdk:
  - oraclejdk11
os:
  - linux
dist: trusty
before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  directories:
    - "$HOME/.gradle/caches/"
    - "$HOME/.gradle/wrapper/"
script:
  - ./gradlew build
  - ./gradlew zipDist
deploy:
  provider: releases
  api_key: $GITHUB_TOKEN
  file_glob: true
  file: dist/*.zip
  skip_cleanup: true
  on:
    tags: true
    branch: master

Use jdk 11 for the branch
Use jdk 11 for the branch
