@@ -18,26 +18,40 @@ java {
18
18
targetCompatibility = JavaVersion .VERSION_1_8
19
19
}
20
20
21
+ val shadowConfiguration by configurations.creating {}
22
+
21
23
dependencies {
24
+ fun shadowAndImplementation (dependencyNotation : Any ) {
25
+ shadowConfiguration(dependencyNotation)
26
+ implementation(dependencyNotation)
27
+ }
28
+
29
+ // TODO: use regular `implementation` configuration for `spring-boot`
30
+ // and maybe for `commons-io`, they will be taken from user's classpath
22
31
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot
23
- implementation(" org.springframework.boot:spring-boot:$springBootVersion " )
24
-
25
- implementation(project(" :utbot-rd" ))
26
- implementation(project(" :utbot-core" ))
27
- implementation(project(" :utbot-framework-api" ))
28
- implementation(" com.jetbrains.rd:rd-framework:$rdVersion " )
29
- implementation(" com.jetbrains.rd:rd-core:$rdVersion " )
30
- implementation(" commons-logging:commons-logging:$commonsLoggingVersion " )
32
+ shadowAndImplementation(" org.springframework.boot:spring-boot:$springBootVersion " )
33
+
31
34
implementation(" io.github.microutils:kotlin-logging:$kotlinLoggingVersion " )
32
- implementation(" commons-io:commons-io:$commonsIOVersion " )
35
+
36
+ shadowAndImplementation(project(" :utbot-rd" ))
37
+ shadowAndImplementation(project(" :utbot-core" ))
38
+ shadowAndImplementation(project(" :utbot-framework-api" ))
39
+ shadowAndImplementation(" com.jetbrains.rd:rd-framework:$rdVersion " )
40
+ shadowAndImplementation(" com.jetbrains.rd:rd-core:$rdVersion " )
41
+ shadowAndImplementation(" commons-logging:commons-logging:$commonsLoggingVersion " )
42
+ shadowAndImplementation(" commons-io:commons-io:$commonsIOVersion " )
33
43
}
34
44
45
+ shadowConfiguration.exclude(group = " org.slf4j" , module = " slf4j-api" )
46
+
35
47
application {
36
48
mainClass.set(" org.utbot.spring.process.SpringAnalyzerProcessMainKt" )
37
49
}
38
50
39
51
// see more details about this task -- https://github.com/spring-projects/spring-boot/issues/1828
40
52
tasks.shadowJar {
53
+ this @shadowJar.configurations = listOf (shadowConfiguration)
54
+
41
55
isZip64 = true
42
56
// Required for Spring
43
57
mergeServiceFiles()
0 commit comments