-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
79 lines (67 loc) · 2.27 KB
/
build.gradle.kts
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
plugins {
java
id( Plugin.SPRING_BOOT_PLUGIN ) version Version.SPRING_BOOT_VERSION
id( Plugin.SPRING_DM ) version Version.SPRING_DM_VERSION
}
allprojects {
apply( plugin = Plugin.JAVA_PLUGIN )
apply( plugin = Plugin.SPRING_BOOT_PLUGIN )
apply( plugin = Plugin.SPRING_DM )
group = "com.quathar.codebay"
version = "0.0.1-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
dependencies {
compileOnly ( Lib.LOMBOK )
annotationProcessor( Lib.LOMBOK_PROCESSOR )
testImplementation ( Lib.SPRING_BOOT_TEST )
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
// <<-PROJECTS CONFIGURATION->>
listOf(Module.DOMAIN, Module.APP, Module.INFRA)
.forEach { projectName ->
project(":$projectName") {
// In a typical Spring Boot project, the bootJar task
// generates an executable JAR file containing all the necessary dependencies
// and configurations to run the Spring Boot application.
// On the other hand, the jar task
// generates a standard JAR file containing only the project's compiled classes.
tasks.getByName("bootJar") {
enabled = false
}
tasks.getByName("jar") {
enabled = true
}
}
}
project(":${ Module.DOMAIN }") {
// Not necessary
// Only showing that domain doesn't have any dependency on other modules
}
project(":${ Module.APP }") {
dependencies {
implementation( project(":${ Module.DOMAIN }") )
}
}
project(":${ Module.INFRA }") {
dependencies {
implementation( project(":${ Module.DOMAIN }") )
implementation( project(":${ Module.APP_CORE }") )
}
}
project(":${ Module.BOOTLOADER }") {
dependencies {
implementation( project(":${ Module.APP_REST }") )
implementation( project(":${ Module.CONFIGURATION }") )
implementation( project(":${ Module.SECURITY_ADAPTER }") )
implementation( project(":${ Module.JPA_ADAPTER }") )
}
}