forked from spockframework/spock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle
131 lines (109 loc) · 3.29 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
import com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
plugins {
id "com.gradle.enterprise" version "3.12.4"
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.10"
id "org.asciidoctor.jvm.convert" version "3.3.2"
id "net.nemerosa.versioning" version "3.0.0"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
id "com.github.ben-manes.versions" version "0.46.0"
id "biz.aQute.bnd.builder" version "6.4.0"
id "io.spring.nohttp" version "0.0.11"
}
}
plugins {
id "com.gradle.enterprise"
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 gradleEnterpriseServer = "https://ge.spockframework.org"
def isCiServer = System.env["CI"] || System.env["GITHUB_ACTIONS"]
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
}
if (gradle.startParameter.buildScan || (isCiServer && accessKeysAreMissing())) {
remote(HttpBuildCache) {
url = uri("$gradleEnterpriseServer/cache/")
push = false
}
} else {
remote(gradleEnterprise.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
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 (((System.getProperty("javaVersion") ?: 8) as int) == 8) {
include "spock-tapestry"
}
include "spock-unitils"
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)
}
}