forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
197 lines (173 loc) · 6.75 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
plugins {
id "java"
id "org.springframework.boot.deployed"
id "org.springframework.boot.conventions"
id "org.springframework.boot.integration-test"
}
description = "Spring Boot CLI"
configurations {
dependenciesBom
loader
testRepository
}
dependencies {
compileOnly(project(":spring-boot-project:spring-boot"))
compileOnly("jakarta.servlet:jakarta.servlet-api")
compileOnly("org.codehaus.groovy:groovy-templates")
compileOnly("org.springframework:spring-web")
dependenciesBom(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "effectiveBom"))
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
implementation("com.vaadin.external.google:android-json")
implementation("jline:jline")
implementation("net.sf.jopt-simple:jopt-simple")
implementation("org.apache.httpcomponents:httpclient") {
exclude group: "commons-logging", module: "commons-logging"
}
implementation("org.apache.maven:maven-model")
implementation("org.apache.maven:maven-resolver-provider") {
exclude group: "com.google.guava", module: "guava"
}
implementation("org.apache.maven.resolver:maven-resolver-connector-basic")
implementation("org.apache.maven.resolver:maven-resolver-transport-file")
implementation("org.apache.maven.resolver:maven-resolver-transport-http") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
implementation("org.apache.maven:maven-settings-builder")
implementation("org.codehaus.groovy:groovy")
implementation("org.slf4j:slf4j-simple")
implementation("org.sonatype.plexus:plexus-sec-dispatcher")
implementation("org.sonatype.sisu:sisu-inject-plexus") {
exclude group: "javax.enterprise", module: "cdi-api"
exclude group: "org.sonatype.sisu", module: "sisu-inject-bean"
}
implementation("org.springframework:spring-core")
implementation("org.springframework.security:spring-security-crypto")
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.assertj:assertj-core")
intTestImplementation("org.junit.jupiter:junit-jupiter")
intTestImplementation("org.springframework:spring-core")
loader(project(":spring-boot-project:spring-boot-tools:spring-boot-loader"))
testCompileOnly("org.apache.tomcat.embed:tomcat-embed-core")
testImplementation(project(":spring-boot-project:spring-boot"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation("org.assertj:assertj-core")
testImplementation("org.codehaus.groovy:groovy-templates")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.mockito:mockito-core")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("org.springframework:spring-test")
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-amqp", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-aop", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-artemis", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-batch", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-data-jpa", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-jdbc", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-integration", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-security", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-web", configuration: "mavenRepository"))
}
task syncSpringBootDependenciesBom(type: Sync) {
destinationDir = file("${buildDir}/generated-resources/org/springframework/boot/cli/compiler/dependencies")
from configurations.dependenciesBom
}
task syncTestRepository(type: Sync) {
destinationDir = file("${buildDir}/test-repository")
from configurations.testRepository
}
sourceSets {
main {
output.dir("${buildDir}/generated-resources", builtBy: "syncSpringBootDependenciesBom")
}
}
test {
dependsOn syncTestRepository
}
task fullJar(type: Jar) {
dependsOn configurations.loader
classifier = "full"
entryCompression = "stored"
from(configurations.runtimeClasspath) {
into "BOOT-INF/lib"
}
from(sourceSets.main.output) {
into "BOOT-INF/classes"
}
from {
zipTree(configurations.loader.singleFile).matching {
exclude "META-INF/LICENSE.txt"
exclude "META-INF/NOTICE.txt"
}
}
manifest {
attributes(
"Class-Loader": "groovy.lang.GroovyClassLoader",
"Main-Class": "org.springframework.boot.loader.JarLauncher",
"Start-Class": "org.springframework.boot.cli.SpringCli"
)
}
}
def configureArchive(archive) {
archive.classifier = "bin"
archive.into "spring-${project.version}"
archive.from(fullJar) {
rename {
it.replace("-full", "")
}
into "lib/"
}
archive.from(file("src/main/content")) {
dirMode = 0755
fileMode = 0644
}
archive.from(file("src/main/executablecontent")) {
fileMode = 0755
}
}
task zip(type: Zip) {
classifier = "bin"
configureArchive it
}
intTest {
dependsOn syncTestRepository, zip
}
task tar(type: Tar) {
compression = "gzip"
archiveExtension = "tar.gz"
configureArchive it
}
task scoopManifest(type: org.springframework.boot.build.cli.ScoopManifest) {
dependsOn zip
outputDir = file("${buildDir}/scoop")
template = file("src/main/scoop/springboot.json")
archive = zip.archiveFile
}
def scoopManifestArtifact = artifacts.add("archives", file("${buildDir}/scoop/springboot.json")) {
type "json"
classifier "scoop"
builtBy "scoopManifest"
}
task homebrewFormula(type: org.springframework.boot.build.cli.HomebrewFormula) {
dependsOn tar
outputDir = file("${buildDir}/homebrew")
template = file("src/main/homebrew/spring-boot.rb")
archive = tar.archiveFile
}
def homebrewFormulaArtifact = artifacts.add("archives", file("${buildDir}/homebrew/spring-boot.rb")) {
type "rb"
classifier "homebrew"
builtBy "homebrewFormula"
}
publishing {
publications {
getByName("maven") {
artifact fullJar
artifact tar
artifact zip
artifact scoopManifestArtifact
artifact homebrewFormulaArtifact
}
}
}