environment:
  JAVA_HOME: C:\Program Files\Java\jdk1.8.0

cache:
  - C:\Users\appveyor\.gradle

build_script:
  - gradlew.bat assemble

test_script:
  - gradlew.bat check

after_test:
  - ps: |
      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path '.\build\test-results\TEST-de.chkpnt.gradle.plugin.truststorebuilder.ImportCertTaskTest.xml'))
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path '.\build\test-results\TEST-de.chkpnt.gradle.plugin.truststorebuilder.TrustStoreBuilderConfigurationTest.xml'))
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path '.\build\test-results\TEST-de.chkpnt.gradle.plugin.truststorebuilder.TrustStoreBuilderPluginTest.xml'))

environment:
  JAVA_HOME: C:\Program Files\Java\jdk1.8.0

cache:
  - C:\Users\appveyor\.gradle

build_script:
  - gradlew.bat assemble

test_script:
  - gradlew.bat check

after_test:
  - ps: |
      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
      ForEach ($file in Get-ChildItem '.\build\test-results\*.xml') {
        (New-Object 'System.Net.WebClient').UploadFile($url, $file)
      }

Fix issue with JUnit-test-results on AppVeyor
Fix issue with JUnit-test-results on AppVeyor
