[build,ci] Enable artifactory build cache (#4200)

This commit is contained in:
Austin Shalit
2022-04-30 20:27:23 -07:00
committed by GitHub
parent 63cf3aaa3f
commit 03230fc842
3 changed files with 45 additions and 3 deletions

View File

@@ -49,3 +49,28 @@ include 'wpilibNewCommands'
include 'myRobot'
include 'docs'
include 'msvcruntime'
buildCache {
def cred = {
if (System.env[it] != null) {
return System.env[it]
} else {
return System.getProperty(it)
}
}
local {
enabled = !System.getenv().containsKey("CI")
}
remote(HttpBuildCache) {
url = "https://frcmaven.wpi.edu/artifactory/wpilib-generic-gradle-cache/"
String user = cred('ARTIFACTORY_PUBLISH_USERNAME')
String pass = cred('ARTIFACTORY_PUBLISH_PASSWORD')
if (user && pass) {
push = true
credentials {
username = user
password = pass
}
}
}
}