spring-boot/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle
Phillip Webb 16e6bc89ed Create a new ImagePackager tools class
Pull functionality from `Repackager` into a new `Packager` base class
and develop a variant for Docker image creation. The new `ImagePackager`
class provides a general purpose way to construct jar entries without
being tied to an actual file. This will allow us to link it to a
buildpack and provide application content directly.

Closes gh-19834
2020-01-20 23:48:47 -08:00

51 lines
1.3 KiB
Groovy

plugins {
id 'java-library'
id 'org.springframework.boot.conventions'
id 'org.springframework.boot.deployed'
id 'org.springframework.boot.internal-dependency-management'
}
description = 'Spring Boot Loader Tools'
def generatedResources = "${buildDir}/generated-resources/main"
configurations {
loader
}
dependencies {
api platform(project(':spring-boot-project:spring-boot-parent'))
api "org.apache.commons:commons-compress"
api "org.springframework:spring-core"
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 {
output.dir(generatedResources, builtBy: 'reproducibleLoaderJar')
}
}
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
archiveFileName = 'spring-boot-loader.jar'
destinationDirectory = file("${generatedResources}/META-INF/loader")
}
jar {
dependsOn reproducibleLoaderJar
}