language: java
jdk:
  - openjdk8
  - openjdk11
  - openjdk12

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 check
  - cd examples && ./gradlew check && cd ..

after_success:
  - ./gradlew jacocoTestReport
  - bash <(curl -s https://codecov.io/bash)

deploy:
- provider: script
  skip_cleanup: true
  script: ./gradlew publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET
  on:
    tags: true
    jdk: openjdk11
- provider: script
  skip_cleanup: true
  script: ./gradlew
  on:
    tags: false
    jdk: openjdk11

language: java
jdk:
  - openjdk8
  - openjdk11
  - openjdk12

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 check
  - cd examples && ./gradlew check && cd ..

after_success:
  - ./gradlew jacocoTestReport
  - bash <(curl -s https://codecov.io/bash)

deploy:
- provider: script
  skip_cleanup: true
  script: ./gradlew uploadDocs publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET
  on:
    tags: true
    jdk: openjdk11
- provider: script
  skip_cleanup: true
  script: ./gradlew uploadDocs
  on:
    tags: false
    jdk: openjdk11

Revert "remove doc upload for a moment"
Revert "remove doc upload for a moment"

This reverts commit f7b348fedc9427ec989287ac8ce8128afc1e79ed.
