File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2
+ import com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer
3
+
1
4
plugins {
2
5
id(" org.springframework.boot" ) version " 2.7.8"
3
6
id(" io.spring.dependency-management" ) version " 1.1.0"
7
+ id(" com.github.johnrengelman.shadow" ) version " 7.1.2"
4
8
id(" java" )
9
+ application
5
10
}
6
11
7
12
java {
@@ -12,4 +17,21 @@ java {
12
17
dependencies {
13
18
implementation(" org.springframework.boot:spring-boot-starter" )
14
19
implementation(" org.springframework.boot:spring-boot-starter-web" )
15
- }
20
+ }
21
+
22
+ application {
23
+ mainClass.set(" org.utbot.spring.ApplicationRunnerKt" )
24
+ }
25
+
26
+ tasks.withType(ShadowJar ::class .java) {
27
+ isZip64 = true
28
+ // Required for Spring
29
+ mergeServiceFiles()
30
+ append(" META-INF/spring.handlers" )
31
+ append(" META-INF/spring.schemas" )
32
+ append(" META-INF/spring.tooling" )
33
+ transform(PropertiesFileTransformer ().apply {
34
+ paths = listOf (" META-INF/spring.factories" )
35
+ mergeStrategy = " append"
36
+ })
37
+ }
You can’t perform that action at this time.
0 commit comments