-
Notifications
You must be signed in to change notification settings - Fork 467
/
settings.gradle
132 lines (109 loc) · 3.21 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
plugins {
id "com.gradle.develocity" version "3.18.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
id "org.asciidoctor.jvm.convert" version "4.0.3"
id "net.nemerosa.versioning" version "3.1.0"
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "com.github.ben-manes.versions" version "0.51.0"
id "biz.aQute.bnd.builder" version "7.0.0"
id "io.spring.nohttp" version "0.0.11"
}
}
plugins {
id "com.gradle.develocity"
id "com.gradle.common-custom-user-data-gradle-plugin"
}
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw new InvalidUserDataException("The spock build needs to be run with JDK 17 or higher, but was: ${JavaVersion.current()}")
}
def develocityServer = "https://ge.spockframework.org"
def isCiServer = System.env["CI"] || System.env["GITHUB_ACTIONS"]
def accessKeysAreMissing() {
return !(System.env['DEVELOCITY_ACCESS_KEY']?.trim())
}
develocity {
buildScan {
uploadInBackground = !isCiServer
if (gradle.startParameter.buildScan || (isCiServer && accessKeysAreMissing())) {
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
} else {
server = develocityServer
publishing.onlyIf { it.authenticated }
}
if (isCiServer) {
termsOfUseAgree = "yes"
}
obfuscation {
if (isCiServer) {
username { "github" }
} else {
hostname { null }
ipAddresses { [] }
}
}
}
}
buildCache {
local {
enabled = !isCiServer
}
if (gradle.startParameter.buildScan || (isCiServer && accessKeysAreMissing())) {
remote(HttpBuildCache) {
url = uri("$develocityServer/cache/")
push = false
}
} else {
remote(develocity.buildCache) {
push = isCiServer
}
}
}
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
includeBuild "build-logic"
include "spock-bom"
include "spock-core"
include "spock-specs"
include "spock-specs:mock-integration"
include "spock-spring"
include "spock-guice"
include "spock-junit4"
include "spock-testkit"
def variant = System.getProperty("variant") as BigDecimal ?: 2.5
def javaVersion = (System.getProperty("javaVersion") ?: 8) as int
if (variant == 2.5) {
//Remove once Groovy 2.5 support is dropped
include "spock-groovy2-compat"
} else {
// require Java 17 which isn't supported by Groovy 2.5
include "spock-spring:boot3-test"
include "spock-spring:spring6-test"
}
// https://issues.apache.org/jira/projects/TAP5/issues/TAP5-2588
if (javaVersion == 8) {
include "spock-tapestry"
}
include "spock-unitils"
if (javaVersion <= 17) {
include "spock-spring:boot2-test"
}
include "spock-spring:spring3-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)
}
}