Enable Gradle build caching in CI

This commit is contained in:
Gary Tierney
2019-07-16 17:08:34 +01:00
parent 91e38aa84e
commit ab787dde14
+13 -1
View File
@@ -1,16 +1,28 @@
pool:
vmImage: 'ubuntu-latest'
variables:
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle
steps:
- task: CacheBeta@0
inputs:
key: $(Agent.OS)
path: $(GRADLE_USER_HOME)
displayName: "Gradle: setup build cache"
- task: Gradle@2
displayName: "Gradle: build"
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true'
gradleOptions: '-Xmx3072m -Dorg.gradle.parallel=true -Dorg.gradle.caching=true'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'build'
- script: |
./gradlew --stop