-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
110 lines (88 loc) · 3.43 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("org.jetbrains.kotlin.jvm") version "1.3.21"
id("org.jetbrains.kotlin.kapt") version "1.3.21"
id("org.springframework.boot") version "2.1.4.RELEASE" apply false
id("org.jetbrains.kotlin.plugin.spring") version "1.3.21" apply false
id("com.gorylenko.gradle-git-properties") version "1.5.1" apply false
}
allprojects {
repositories {
// 요게 없으면 Cannot resolve external dependency org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.21 because no repositories are defined. 발생
jcenter() // mavenCentral 인건 상관없네.
}
}
subprojects {
apply(plugin = "kotlin") // 요부분을 apply { plugin("kotlin")} -> apply(plugin="kotlin")
apply(plugin = "kotlin-kapt")
apply(plugin = "org.springframework.boot")
apply(plugin = "io.spring.dependency-management")
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
apply(plugin = "com.gorylenko.gradle-git-properties")
group = "io.honeymon.boot"
version = "1.0.0"
dependencies {
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
compile("org.jetbrains.kotlin:kotlin-reflect")
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.springframework.boot:spring-boot-starter-logging")
/**
* @see <a href="https://kotlinlang.org/docs/reference/kapt.html">Annotation Processing with Kotlin</a>
*/
kapt("org.springframework.boot:spring-boot-configuration-processor")
compileOnly("org.springframework.boot:spring-boot-configuration-processor")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
tasks {
compileKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
dependsOn(processResources) // kotlin 에서 ConfigurationProperties
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
}
}
project("bootiful-core") {
dependencies {
compile("org.springframework.boot:spring-boot-starter-data-jpa")
runtimeOnly("com.h2database:h2")
}
// tasks {
// getByName<BootJar>("bootJar") {
// enabled = false
// }
// getByName<Jar>("jar") {
// enabled = true
// }
// }
val jar: Jar by tasks
val bootJar: BootJar by tasks
bootJar.enabled = false
jar.enabled = true
}
project(":bootiful-sbadmin") {
dependencies {
compile(project(":bootiful-core"))
compile("de.codecentric:spring-boot-admin-starter-server:2.1.4")
compile("org.springframework.boot:spring-boot-starter-web")
// Spring Boot Admin-api 대신 클라우드 환경에서 사용한다면!
// compile("org.springframework.cloud:spring-cloud-starter-netflix-eureka-api")
}
}
project("bootiful-api") {
dependencies {
compile(project(":bootiful-core"))
compile("de.codecentric:spring-boot-admin-starter-client:2.1.4")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-security")
compile("org.springframework.boot:spring-boot-starter-actuator")
runtime("org.springframework.boot:spring-boot-devtools")
}
}