-
Notifications
You must be signed in to change notification settings - Fork 40.8k
/
build.gradle
178 lines (158 loc) · 6.29 KB
/
build.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
plugins {
id "org.springframework.boot.antora-contributor"
id "org.springframework.boot.maven-plugin"
id "org.springframework.boot.optional-dependencies"
id "org.springframework.boot.docker-test"
}
description = "Spring Boot Maven Plugin"
configurations {
dependenciesBom
}
dependencies {
compileOnly("org.apache.maven.plugin-tools:maven-plugin-annotations")
compileOnly("org.apache.maven:maven-core") {
exclude(group: "javax.annotation", module: "javax.annotation-api")
exclude(group: "javax.inject", module: "javax.inject")
}
compileOnly("org.apache.maven:maven-plugin-api") {
exclude(group: "javax.annotation", module: "javax.annotation-api")
exclude(group: "javax.enterprise", module: "cdi-api")
exclude(group: "javax.inject", module: "javax.inject")
}
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
dockerTestImplementation("org.apache.maven.shared:maven-invoker") {
exclude(group: "javax.inject", module: "javax.inject")
}
dockerTestImplementation("org.assertj:assertj-core")
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
dockerTestImplementation("org.testcontainers:junit-jupiter")
dockerTestImplementation("org.testcontainers:testcontainers")
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
implementation("org.apache.maven.shared:maven-common-artifact-filters") {
exclude(group: "javax.annotation", module: "javax.annotation-api")
exclude(group: "javax.enterprise", module: "cdi-api")
exclude(group: "javax.inject", module: "javax.inject")
}
implementation("org.sonatype.plexus:plexus-build-api") {
exclude(group: "org.codehaus.plexus", module: "plexus-utils")
}
implementation("org.springframework:spring-core")
implementation("org.springframework:spring-context")
optional("org.apache.maven.plugins:maven-shade-plugin") {
exclude(group: "javax.annotation", module: "javax.annotation-api")
exclude(group: "javax.enterprise", module: "cdi-api")
exclude(group: "javax.inject", module: "javax.inject")
}
testImplementation("org.apache.maven:maven-core") {
exclude(group: "javax.annotation", module: "javax.annotation-api")
exclude(group: "javax.inject", module: "javax.inject")
}
testImplementation("org.apache.maven.shared:maven-common-artifact-filters") {
exclude(group: "javax.annotation", module: "javax.annotation-api")
exclude(group: "javax.enterprise", module: "cdi-api")
exclude(group: "javax.inject", module: "javax.inject")
}
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.mockito:mockito-core")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("org.springframework:spring-core")
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
intTestImplementation("org.apache.maven.shared:maven-invoker") {
exclude(group: "javax.inject", module: "javax.inject")
}
intTestImplementation("org.assertj:assertj-core")
intTestImplementation("org.junit.jupiter:junit-jupiter")
mavenRepository(project(path: ":spring-boot-project:spring-boot", configuration: "mavenRepository"))
mavenRepository(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "mavenRepository"))
mavenRepository(project(path: ":spring-boot-project:spring-boot-test", configuration: "mavenRepository"))
mavenRepository(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "mavenRepository"))
mavenRepository(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "mavenRepository"))
mavenRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-parent", configuration: "mavenRepository"))
versionProperties(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "effectiveBom"))
}
ext {
versionElements = version.split("\\.")
xsdVersion = versionElements[0] + "." + versionElements[1]
}
task copySettingsXml(type: Copy) {
from file("src/intTest/projects/settings.xml")
into layout.buildDirectory.dir("generated-resources/settings")
filter(springRepositoryTransformers.mavenSettings())
}
sourceSets {
main {
output.dir(layout.buildDirectory.dir("generated/resources/xsd"), builtBy: "xsdResources")
}
intTest {
output.dir(layout.buildDirectory.dir("generated-resources"), builtBy: ["extractVersionProperties", "copySettingsXml"])
}
dockerTest {
output.dir(layout.buildDirectory.dir("generated-resources"), builtBy: "extractVersionProperties")
}
}
javadoc {
options {
author = true
docTitle = "Spring Boot Maven Plugin ${project.version} API"
encoding = "UTF-8"
memberLevel = "protected"
outputLevel = "quiet"
splitIndex = true
use = true
windowTitle = "Spring Boot Maven Plugin ${project.version} API"
}
}
task xsdResources(type: Sync) {
from "src/main/xsd/layers-${project.ext.xsdVersion}.xsd"
into layout.buildDirectory.dir("generated/resources/xsd/org/springframework/boot/maven")
rename { fileName -> "layers.xsd" }
}
prepareMavenBinaries {
versions = [ "3.9.9", "3.6.3" ]
}
tasks.named("documentPluginGoals") {
goalSections = [
"build-image": "build-image",
"build-image-no-fork": "build-image",
"build-info": "build-info",
"help": "help",
"process-aot": "aot",
"process-test-aot": "aot",
"repackage": "packaging",
"run": "run",
"start": "integration-tests",
"stop": "integration-tests",
"test-run": "run"
]
}
antoraContributions {
'maven-plugin' {
aggregateContent {
from(documentPluginGoals) {
into "modules/maven-plugin/partials/goals"
}
}
catalogContent {
from(javadoc) {
into "api/java"
}
}
localAggregateContent {
from(tasks.named("generateAntoraYml")) {
into "modules"
}
}
source()
}
}
tasks.named("generateAntoraPlaybook") {
antoraExtensions.xref.stubs = ["appendix:.*", "api:.*", "reference:.*", "how-to:.*"]
asciidocExtensions.excludeJavadocExtension = true
}
tasks.named("dockerTest").configure {
dependsOn tasks.named("prepareMavenBinaries")
}