forked from jenkinsci/gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
51 lines (43 loc) · 1.47 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
plugins {
id("com.gradle.enterprise") version "3.15.1"
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.11.3"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}
includeBuild("build-logic")
include("acceptance-tests")
include("configuration-maven-extension")
rootProject.name = "gradle-plugin"
if (!JavaVersion.current().isJava11) {
throw GradleException("Build requires Java 11")
}
val gradleExt = (gradle as ExtensionAware).extra
val ciJenkinsBuild by gradleExt { System.getenv("JENKINS_URL") != null }
val ciTeamCityBuild by gradleExt { System.getenv("TEAMCITY_VERSION") != null }
val isCi by gradleExt { ciJenkinsBuild || ciTeamCityBuild }
val gradleEnterpriseMavenExtensionVersion by gradleExt { "1.19.1" }
val commonCustomUserDataMavenExtensionVersion by gradleExt { "1.12.3" }
gradleEnterprise {
projectId = "jenkinsci-gradle-plugin"
buildScan {
capture { isTaskInputFiles = true }
isUploadInBackground = !isCi
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
obfuscation {
ipAddresses { addresses -> addresses.map { _ -> "0.0.0.0" } }
}
}
}
buildCache {
local {
isEnabled = true
}
if (ciTeamCityBuild) {
remote(gradleEnterprise.buildCache) {
isEnabled = true
isPush = true
server = System.getenv("GRADLE_CACHE_REMOTE_URL")
}
}
}