forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
65 lines (53 loc) · 1.82 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
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
jarmode
}
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"))
jarmode(project(":spring-boot-project:spring-boot-tools:spring-boot-jarmode-layertools"))
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 {
resources.srcDirs generatedResources
}
}
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")
}
task reproducibleJarModeLayerToolsJar(type: Jar) {
dependsOn configurations.jarmode
from {
zipTree(configurations.jarmode.incoming.files.filter {it.name.startsWith "spring-boot-jarmode-layertools" }.singleFile)
}
reproducibleFileOrder = true
preserveFileTimestamps = false
archiveFileName = "spring-boot-jarmode-layertools.jar"
destinationDirectory = file("${generatedResources}/META-INF/jarmode")
}
processResources {
dependsOn reproducibleLoaderJar
dependsOn reproducibleJarModeLayerToolsJar
}