-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
75 lines (66 loc) · 2.09 KB
/
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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://elide-snapshots.storage-download.googleapis.com/repository/v3/")
}
}
plugins {
id("com.gradle.enterprise") version("3.13.1")
id("org.gradle.toolchains.foojay-resolver-convention") version("0.5.0")
}
dependencyResolutionManagement {
repositoriesMode.set(
RepositoriesMode.PREFER_PROJECT
)
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://elide-snapshots.storage-download.googleapis.com/repository/v3/")
}
}
rootProject.name = "elide-gradle-plugin"
val buildExamples: String? by settings
if (buildExamples == "true") {
include(
":example:fullstack:browser",
":example:fullstack:node",
":example:fullstack:server",
":example:static:frontend",
":example:static:server",
":example:mixed",
)
}
includeBuild("plugin-build")
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
val cacheUsername: String? by settings
val cachePassword: String? by settings
val cachePush: String? by settings
val remoteCache = System.getenv("GRADLE_CACHE_REMOTE")?.toBoolean() ?: false
val localCache = System.getenv("GRADLE_LOCAL_REMOTE")?.toBoolean() ?: true
buildCache {
local {
isEnabled = localCache
}
if (remoteCache) {
remote<HttpBuildCache> {
isEnabled = true
isPush = (cachePush ?: System.getenv("GRADLE_CACHE_PUSH")) == "true"
isUseExpectContinue = true
url = uri(System.getenv("CACHE_ENDPOINT") ?: "https://gradle.less.build/cache/generic/")
when (val pswd = cachePassword ?: System.getenv("GRADLE_CACHE_PASSWORD")) {
null -> {}
else -> credentials {
username = cacheUsername ?: System.getenv("GRADLE_CACHE_USERNAME") ?: "apikey"
password = pswd
}
}
}
}
}
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")