forked from spockframework/spock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle
executable file
·109 lines (92 loc) · 2.93 KB
/
settings.gradle
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
pluginManagement {
plugins {
id "com.gradle.enterprise" version "3.6.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.2.1"
id "org.asciidoctor.jvm.convert" version "3.3.2"
id "net.nemerosa.versioning" version "2.14.0"
id "de.marcphilipp.nexus-publish" version "0.4.0"
id "com.github.ben-manes.versions" version "0.38.0"
id "biz.aQute.bnd.builder" version "5.3.0"
}
}
plugins {
id "com.gradle.enterprise"
id "com.gradle.common-custom-user-data-gradle-plugin"
}
def gradleEnterpriseServer = "https://ge.spockframework.org"
def isCiServer = System.env["CI"] || System.env["GITHUB_ACTIONS"]
def spockBuildCacheUsername = ext.has('spockBuildCacheUsername') ? ext['spockBuildCacheUsername'] : null
def spockBuildCachePassword = ext.has('spockBuildCachePassword') ? ext['spockBuildCachePassword'] : null
def accessKeysAreMissing() {
return !(System.env['GRADLE_ENTERPRISE_ACCESS_KEY']?.trim())
}
gradleEnterprise {
buildScan {
captureTaskInputFiles = true
uploadInBackground = !isCiServer
if (gradle.startParameter.buildScan || (isCiServer && accessKeysAreMissing())) {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
} else {
server = gradleEnterpriseServer
publishAlways()
(delegate as BuildScanExtensionWithHiddenFeatures).publishIfAuthenticated()
}
if (isCiServer) {
publishAlways()
termsOfServiceAgree = "yes"
}
obfuscation {
if (isCiServer) {
username { "github" }
} else {
hostname { null }
ipAddresses { [] }
}
}
}
}
buildCache {
local {
enabled = !isCiServer
}
remote(HttpBuildCache) {
url = uri("$gradleEnterpriseServer/cache/")
push = isCiServer && spockBuildCacheUsername && spockBuildCachePassword
credentials {
username = spockBuildCacheUsername ?: null
password = spockBuildCachePassword ?: null
}
}
}
include "spock-bom"
include "spock-core"
include "spock-specs"
include "spock-specs:mock-integration"
include "spock-spring"
include "spock-spring:spring3-test"
include "spock-guice"
include "spock-junit4"
include "spock-temp"
include "spock-testkit"
if ((System.getProperty("variant") as BigDecimal ?: 2.5) != 3.0) {
//Remove once Groovy 2.5 support is dropped
include "spock-groovy2-compat"
}
// https://issues.apache.org/jira/projects/TAP5/issues/TAP5-2588
if (JavaVersion.current().isJava8()) {
include "spock-tapestry"
}
include "spock-unitils"
include "spock-gradle"
include "spock-spring:boot-test"
include "spock-spring:boot2-test"
include "spock-spring:spring5-test"
rootProject.name = "spock"
nameBuildScriptsAfterProjectNames(rootProject.children)
def nameBuildScriptsAfterProjectNames(projects) {
for (prj in projects) {
prj.buildFileName = prj.name + ".gradle" - "spock-"
nameBuildScriptsAfterProjectNames(prj.children)
}
}