dist: xenial

language: java
install: true

matrix: 
  include: 
  - jdk: oraclejdk9

script: 
  - git config --global push.default simple
  - export GIT_TAG=$TRAVIS_BRANCH.$TRAVIS_BUILD_NUMBER
  - gradle clean build
  - gradle dist
  - tar -zcf hello_world_test_reports.tar.gz build/reports
  - tar -zcf hello_world_executable_distributions.tar.gz build/distributions


before_deploy:
  - git config --global user.email "builds@travis-ci.com"
  - git config --global user.name "Travis CI"
  - export GIT_TAG=$TRAVIS_BRANCH.$TRAVIS_BUILD_NUMBER
  - echo "Just generated GIT_TAG for $TRAVIS_BRANCH.$TRAVIS_BUILD_NUMBER" >> $TRAVIS_BUILD_DIR/build.txt
  - git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
#  ******************  change the "drlehr" part of the line below to reflect your organization's path *******************
  - git push -q https://$GITPERM@github.com/drlehr/Java_Gradle_Hello_World  --tags
#  ******************  change the "drlehr" part of the line above to reflect your organization's path *******************
  
deploy:
  provider: releases
  api_key:
    secure: $GITPERM
  file: 
    - README.md
    - hello_world_test_reports.tar.gz 
    - hello_world_executable_distributions.tar.gz 
  skip_cleanup: true  
  on:
    tags: false
    all_branches: true
    

    

