forked from peterarsentev/job4j_devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
22 lines (19 loc) · 956 Bytes
/
settings.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
rootProject.name = "DevOps"
val remoteCacheUrl = System.getenv("GRADLE_REMOTE_CACHE_URL") ?: (extra.properties["GRADLE_REMOTE_CACHE_URL"] as? String)
val remoteCachePush = System.getenv("GRADLE_REMOTE_CACHE_PUSH") ?: (extra.properties["GRADLE_REMOTE_CACHE_PUSH"] as? String)
val remoteCacheUsername = System.getenv("GRADLE_REMOTE_CACHE_USERNAME") ?: (extra.properties["GRADLE_REMOTE_CACHE_USERNAME"] as? String)
val remoteCachePassword = System.getenv("GRADLE_REMOTE_CACHE_PASSWORD") ?: (extra.properties["GRADLE_REMOTE_CACHE_PASSWORD"] as? String)
if (remoteCacheUrl != null) {
buildCache {
remote<HttpBuildCache> {
isAllowInsecureProtocol = true
isAllowUntrustedServer = true
url = uri(remoteCacheUrl)
isPush = remoteCachePush.toBoolean()
credentials {
username = remoteCacheUsername
password = remoteCachePassword
}
}
}
}