1
1
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
+ import org.springframework.boot.gradle.tasks.bundling.BootJar
2
3
3
4
plugins {
4
5
id(" org.springframework.boot" ) version " 3.0.2"
@@ -7,35 +8,90 @@ plugins {
7
8
kotlin(" plugin.spring" ) version " 1.7.22"
8
9
}
9
10
10
- group = " co.bearus"
11
- version = " 0.0.1-SNAPSHOT"
12
- java.sourceCompatibility = JavaVersion .VERSION_17
13
-
14
11
repositories {
15
12
mavenCentral()
16
13
}
17
14
18
- dependencies {
19
- implementation(" org.springframework.boot:spring-boot-starter-data-r2dbc" )
20
- implementation(" org.springframework.boot:spring-boot-starter-webflux" )
21
- implementation(" com.fasterxml.jackson.module:jackson-module-kotlin" )
22
- implementation(" io.projectreactor.kotlin:reactor-kotlin-extensions" )
23
- implementation(" org.flywaydb:flyway-core" )
24
- implementation(" org.jetbrains.kotlin:kotlin-reflect" )
25
- implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8" )
26
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-reactor" )
27
- implementation(" org.springframework:spring-jdbc" )
28
- testImplementation(" org.springframework.boot:spring-boot-starter-test" )
29
- testImplementation(" io.projectreactor:reactor-test" )
15
+ subprojects {
16
+ apply (plugin = " java-library" )
17
+ apply (plugin = " org.springframework.boot" )
18
+ apply (plugin = " io.spring.dependency-management" )
19
+
20
+ group = " co.bearus"
21
+ version = " 0.0.1-SNAPSHOT"
22
+ java.sourceCompatibility = JavaVersion .VERSION_17
23
+
24
+ repositories {
25
+ mavenCentral()
26
+ }
27
+
28
+ dependencies {
29
+ implementation(" org.springframework.boot:spring-boot-starter-data-r2dbc" )
30
+ implementation(" org.springframework.boot:spring-boot-starter-webflux" )
31
+ implementation(" com.fasterxml.jackson.module:jackson-module-kotlin" )
32
+ implementation(" io.projectreactor.kotlin:reactor-kotlin-extensions" )
33
+ implementation(" org.flywaydb:flyway-core" )
34
+ implementation(" org.jetbrains.kotlin:kotlin-reflect" )
35
+ implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8" )
36
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-reactor" )
37
+ implementation(" org.springframework:spring-jdbc" )
38
+ testImplementation(" org.springframework.boot:spring-boot-starter-test" )
39
+ testImplementation(" io.projectreactor:reactor-test" )
40
+ }
41
+
42
+ tasks.withType<KotlinCompile > {
43
+ kotlinOptions {
44
+ freeCompilerArgs = listOf (" -Xjsr305=strict" )
45
+ jvmTarget = " 17"
46
+ }
47
+ }
48
+
49
+ tasks.withType<Test > {
50
+ useJUnitPlatform()
51
+ }
52
+
53
+ val jar: Jar by tasks
54
+ val bootJar: BootJar by tasks
55
+
56
+ bootJar.enabled = false
57
+ jar.enabled = false
58
+ }
59
+
60
+ project(" :use-case" ) {
61
+ dependencies {
62
+ api(project(" :entity" ))
63
+ }
30
64
}
31
65
32
- tasks.withType< KotlinCompile > {
33
- kotlinOptions {
34
- freeCompilerArgs = listOf ( " -Xjsr305=strict " )
35
- jvmTarget = " 17 "
66
+ project( " :infrastructure " ) {
67
+ dependencies {
68
+ api(project( " :use-case " ) )
69
+ // DB
36
70
}
37
71
}
38
72
39
- tasks.withType<Test > {
40
- useJUnitPlatform()
73
+ project(" :presenter" ) {
74
+ dependencies {
75
+ api(project(" :use-case" ))
76
+ api(" org.springframework.boot:spring-boot-starter-webflux" )
77
+ api(" org.springframework.boot:spring-boot-starter-validation" )
78
+ }
79
+ }
80
+
81
+ project(" :config" ) {
82
+ val jar: Jar by tasks
83
+ val bootJar: BootJar by tasks
84
+
85
+ bootJar.enabled = true
86
+ jar.enabled = true
87
+
88
+ dependencies {
89
+ api(project(" :entity" ))
90
+ api(project(" :use-case" ))
91
+ api(project(" :presenter" ))
92
+ api(project(" :infrastructure" ))
93
+
94
+ api(" org.springframework.boot:spring-boot-starter-webflux" )
95
+ testImplementation(" org.springframework.boot:spring-boot-starter-test" )
96
+ }
41
97
}
0 commit comments