You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
3.6 KiB
Groovy
137 lines
3.6 KiB
Groovy
5 years ago
|
plugins {
|
||
5 years ago
|
id "java"
|
||
2 years ago
|
id "eclipse"
|
||
5 years ago
|
id "org.springframework.boot.deployed"
|
||
|
id "org.springframework.boot.conventions"
|
||
|
id "org.springframework.boot.integration-test"
|
||
5 years ago
|
}
|
||
|
|
||
|
description = "Spring Boot CLI"
|
||
|
|
||
|
configurations {
|
||
|
dependenciesBom
|
||
|
loader
|
||
|
testRepository
|
||
2 years ago
|
compileOnlyProject
|
||
|
compileClasspath.extendsFrom(compileOnlyProject)
|
||
5 years ago
|
}
|
||
|
|
||
|
dependencies {
|
||
2 years ago
|
compileOnlyProject(project(":spring-boot-project:spring-boot"))
|
||
5 years ago
|
|
||
5 years ago
|
dependenciesBom(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "effectiveBom"))
|
||
5 years ago
|
|
||
5 years ago
|
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")
|
||
5 years ago
|
implementation("org.apache.httpcomponents:httpclient") {
|
||
|
exclude group: "commons-logging", module: "commons-logging"
|
||
5 years ago
|
}
|
||
5 years ago
|
implementation("org.slf4j:slf4j-simple")
|
||
|
implementation("org.springframework:spring-core")
|
||
|
implementation("org.springframework.security:spring-security-crypto")
|
||
5 years ago
|
|
||
5 years ago
|
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")
|
||
5 years ago
|
|
||
5 years ago
|
loader(project(":spring-boot-project:spring-boot-tools:spring-boot-loader"))
|
||
5 years ago
|
|
||
5 years ago
|
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.junit.jupiter:junit-jupiter")
|
||
|
testImplementation("org.mockito:mockito-core")
|
||
4 years ago
|
testImplementation("org.mockito:mockito-junit-jupiter")
|
||
5 years ago
|
testImplementation("org.springframework:spring-test")
|
||
5 years ago
|
}
|
||
|
|
||
|
task fullJar(type: Jar) {
|
||
4 years ago
|
dependsOn configurations.loader
|
||
5 years ago
|
classifier = "full"
|
||
|
entryCompression = "stored"
|
||
5 years ago
|
from(configurations.runtimeClasspath) {
|
||
5 years ago
|
into "BOOT-INF/lib"
|
||
5 years ago
|
}
|
||
|
from(sourceSets.main.output) {
|
||
5 years ago
|
into "BOOT-INF/classes"
|
||
5 years ago
|
}
|
||
4 years ago
|
from {
|
||
|
zipTree(configurations.loader.singleFile).matching {
|
||
4 years ago
|
exclude "META-INF/LICENSE.txt"
|
||
|
exclude "META-INF/NOTICE.txt"
|
||
3 years ago
|
exclude "META-INF/spring-boot.properties"
|
||
4 years ago
|
}
|
||
5 years ago
|
}
|
||
|
manifest {
|
||
|
attributes(
|
||
5 years ago
|
"Main-Class": "org.springframework.boot.loader.JarLauncher",
|
||
|
"Start-Class": "org.springframework.boot.cli.SpringCli"
|
||
5 years ago
|
)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
def configureArchive(archive) {
|
||
5 years ago
|
archive.classifier = "bin"
|
||
5 years ago
|
archive.into "spring-${project.version}"
|
||
|
archive.from(fullJar) {
|
||
|
rename {
|
||
|
it.replace("-full", "")
|
||
|
}
|
||
5 years ago
|
into "lib/"
|
||
5 years ago
|
}
|
||
5 years ago
|
archive.from(file("src/main/content")) {
|
||
5 years ago
|
dirMode = 0755
|
||
|
fileMode = 0644
|
||
5 years ago
|
}
|
||
5 years ago
|
archive.from(file("src/main/executablecontent")) {
|
||
5 years ago
|
fileMode = 0755
|
||
5 years ago
|
}
|
||
|
}
|
||
|
|
||
|
task zip(type: Zip) {
|
||
5 years ago
|
classifier = "bin"
|
||
5 years ago
|
configureArchive it
|
||
|
}
|
||
|
|
||
|
intTest {
|
||
2 years ago
|
dependsOn zip
|
||
5 years ago
|
}
|
||
|
|
||
|
task tar(type: Tar) {
|
||
5 years ago
|
compression = "gzip"
|
||
|
archiveExtension = "tar.gz"
|
||
5 years ago
|
configureArchive it
|
||
|
}
|
||
|
|
||
|
task homebrewFormula(type: org.springframework.boot.build.cli.HomebrewFormula) {
|
||
|
dependsOn tar
|
||
5 years ago
|
outputDir = file("${buildDir}/homebrew")
|
||
4 years ago
|
template = file("src/main/homebrew/spring-boot.rb")
|
||
5 years ago
|
archive = tar.archiveFile
|
||
|
}
|
||
|
|
||
4 years ago
|
def homebrewFormulaArtifact = artifacts.add("archives", file("${buildDir}/homebrew/spring-boot.rb")) {
|
||
5 years ago
|
type "rb"
|
||
|
classifier "homebrew"
|
||
|
builtBy "homebrewFormula"
|
||
5 years ago
|
}
|
||
|
|
||
|
publishing {
|
||
|
publications {
|
||
5 years ago
|
getByName("maven") {
|
||
5 years ago
|
artifact fullJar
|
||
|
artifact tar
|
||
|
artifact zip
|
||
|
artifact homebrewFormulaArtifact
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
2 years ago
|
eclipse.classpath { // https://github.com/eclipse/buildship/issues/939
|
||
|
plusConfigurations += [ configurations.compileOnlyProject ]
|
||
|
}
|