2020-01-10 21:48:43 +08:00
|
|
|
plugins {
|
2020-01-23 03:24:37 +08:00
|
|
|
id "java-library"
|
|
|
|
id "org.springframework.boot.conventions"
|
|
|
|
id "org.springframework.boot.deployed"
|
|
|
|
id "org.springframework.boot.internal-dependency-management"
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
|
2020-01-23 03:24:37 +08:00
|
|
|
description = "Spring Boot Loader Tools"
|
2020-01-10 21:48:43 +08:00
|
|
|
|
|
|
|
def generatedResources = "${buildDir}/generated-resources/main"
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
loader
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-01-23 03:24:37 +08:00
|
|
|
api platform(project(":spring-boot-project:spring-boot-parent"))
|
2020-01-17 18:34:55 +08:00
|
|
|
api "org.apache.commons:commons-compress"
|
2020-01-21 07:43:12 +08:00
|
|
|
api "org.springframework:spring-core"
|
2020-01-10 21:48:43 +08:00
|
|
|
|
|
|
|
compileOnly "ch.qos.logback:logback-classic"
|
|
|
|
|
|
|
|
loader project(":spring-boot-project:spring-boot-tools:spring-boot-loader")
|
|
|
|
|
|
|
|
testImplementation "org.assertj:assertj-core"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter"
|
|
|
|
testImplementation "org.mockito:mockito-core"
|
|
|
|
testImplementation "org.zeroturnaround:zt-zip:1.13"
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
2020-01-21 20:47:29 +08:00
|
|
|
resources.srcDirs generatedResources
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task reproducibleLoaderJar(type: Jar) {
|
|
|
|
dependsOn configurations.loader
|
|
|
|
from {
|
|
|
|
zipTree(configurations.loader.incoming.files.filter {it.name.startsWith "spring-boot-loader" }.singleFile)
|
|
|
|
}
|
|
|
|
reproducibleFileOrder = true
|
|
|
|
preserveFileTimestamps = false
|
2020-01-23 03:24:37 +08:00
|
|
|
archiveFileName = "spring-boot-loader.jar"
|
2020-01-10 21:48:43 +08:00
|
|
|
destinationDirectory = file("${generatedResources}/META-INF/loader")
|
|
|
|
}
|
|
|
|
|
2020-01-21 20:47:29 +08:00
|
|
|
processResources {
|
2020-01-10 21:48:43 +08:00
|
|
|
dependsOn reproducibleLoaderJar
|
|
|
|
}
|