Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ steps:

- template: /build-tools/automation/yaml-templates/log-disk-space.yaml

- template: /build-tools/automation/yaml-templates/cache-gradle.yaml
parameters:
xaSourcePath: ${{ parameters.xaSourcePath }}

- script: make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration) MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
workingDirectory: ${{ parameters.xaSourcePath }}
displayName: make jenkins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ steps:

- template: /build-tools/automation/yaml-templates/log-disk-space.yaml

- template: /build-tools/automation/yaml-templates/cache-gradle.yaml
parameters:
xaSourcePath: ${{ parameters.xaSourcePath }}

# Prepare and Build everything
- script: make jenkins CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 PREPARE_AUTOPROVISION=1 MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
workingDirectory: ${{ parameters.xaSourcePath }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ steps:
parameters:
remove_dotnet: true

- template: /build-tools/automation/yaml-templates/cache-gradle.yaml
parameters:
xaSourcePath: $(System.DefaultWorkingDirectory)

- task: DotNetCoreCLI@2
displayName: Prepare Solution
inputs:
Expand Down
21 changes: 21 additions & 0 deletions build-tools/automation/yaml-templates/cache-gradle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Shared Gradle dependency cache template
# Caches Gradle downloads between pipeline runs to avoid transient network
# failures when resolving Maven dependencies.
#
# See: https://learn.microsoft.com/azure/devops/pipelines/release/caching

parameters:
xaSourcePath: $(System.DefaultWorkingDirectory)/android

steps:
- script: git submodule status --cached external/Java.Interop > $(Agent.TempDirectory)/java-interop-submodule-hash.txt
workingDirectory: ${{ parameters.xaSourcePath }}
displayName: get Java.Interop submodule hash

- task: Cache@2
displayName: cache Gradle downloads
inputs:
key: '"gradle" | "v1" | "$(Agent.OS)" | ${{ parameters.xaSourcePath }}/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties | ${{ parameters.xaSourcePath }}/src/**/build.gradle | $(Agent.TempDirectory)/java-interop-submodule-hash.txt'
restoreKeys: |
"gradle" | "v1" | "$(Agent.OS)"
path: $(HOME)/.gradle/caches
Loading