environment:
  APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma2 -mx=9
  JAVA_HOME: C:\Program Files\Java\jdk1.8.0

build_script:
  - gradlew.bat build --no-daemon --stacktrace

on_success:
  - ps: Get-ChildItem C:\Users\appveyor\.gradle\caches\modules-2 -Include *.lock -ErrorAction SilentlyContinue | Remove-Item -Force
  - ps: Get-ChildItem C:\Users\appveyor\.gradle\caches\transforms-1 -Include *.lock -ErrorAction SilentlyContinue | Remove-Item -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\file-changes\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\fileHashes\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\plugin-resolution\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\scripts\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\scripts-remapped\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\gradle-script-kotlin\ -Recurse -Force

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

environment:
  APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma2 -mx=9
  JAVA_HOME: C:\Program Files\Java\jdk1.8.0

build_script:
  - gradlew.bat build -x ktlintMainSourceSetCheck --no-daemon --stacktrace
  # ktlintMainSourceSetCheck currently fails on windows due to command line length issues

on_success:
  - ps: Get-ChildItem C:\Users\appveyor\.gradle\caches\modules-2 -Include *.lock -ErrorAction SilentlyContinue | Remove-Item -Force
  - ps: Get-ChildItem C:\Users\appveyor\.gradle\caches\transforms-1 -Include *.lock -ErrorAction SilentlyContinue | Remove-Item -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\file-changes\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\fileHashes\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\plugin-resolution\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\scripts\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\scripts-remapped\ -Recurse -Force
  - ps: Remove-Item C:\Users\appveyor\.gradle\caches\*\gradle-script-kotlin\ -Recurse -Force

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

Disable ktlintMainSourceSetCheck on AppVeyor Windows CI
Disable ktlintMainSourceSetCheck on AppVeyor Windows CI
