2022-09-21 12:04:29 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
2022-09-21 12:21:48 +00:00
|
|
|
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
2022-09-21 12:04:29 +00:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("org.springframework.boot") version "2.7.3"
|
|
|
|
id("io.spring.dependency-management") version "1.0.13.RELEASE"
|
|
|
|
kotlin("jvm") version "1.6.21"
|
2022-09-21 12:21:48 +00:00
|
|
|
kotlin("plugin.spring") version "1.6.21" apply false
|
|
|
|
kotlin("plugin.jpa") version "1.6.21" apply false
|
2022-09-21 12:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
java.sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
2022-09-21 12:21:48 +00:00
|
|
|
allprojects {
|
|
|
|
group = "com.kakaoent.adp.adserver"
|
|
|
|
version = "0.0.1-SNAPSHOT"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
2022-09-21 12:04:29 +00:00
|
|
|
}
|
2022-09-21 12:21:48 +00:00
|
|
|
subprojects {
|
|
|
|
|
|
|
|
apply(plugin = "java")
|
|
|
|
|
|
|
|
apply(plugin = "io.spring.dependency-management")
|
|
|
|
apply(plugin = "org.springframework.boot")
|
|
|
|
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
|
|
|
|
|
|
|
|
apply(plugin = "kotlin")
|
|
|
|
apply(plugin = "kotlin-spring") //all-open
|
|
|
|
apply(plugin = "kotlin-jpa")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
|
|
|
runtimeOnly("mysql:mysql-connector-java")
|
|
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencyManagement {
|
|
|
|
imports {
|
|
|
|
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
dependency("net.logstash.logback:logstash-logback-encoder:6.6")
|
|
|
|
}
|
|
|
|
}
|
2022-09-21 12:04:29 +00:00
|
|
|
|
2022-09-21 12:21:48 +00:00
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
kotlinOptions {
|
|
|
|
freeCompilerArgs = listOf("-Xjsr305=strict")
|
|
|
|
jvmTarget = "17"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<Test> {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
compileOnly {
|
|
|
|
extendsFrom(configurations.annotationProcessor.get())
|
|
|
|
}
|
|
|
|
}
|
2022-09-21 12:04:29 +00:00
|
|
|
}
|
|
|
|
|
2022-09-21 12:21:48 +00:00
|
|
|
//api <- domain, support 의존
|
|
|
|
project(":api") {
|
|
|
|
dependencies {
|
|
|
|
implementation(project(":domain"))
|
|
|
|
implementation(project(":support"))
|
2022-09-21 12:04:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-21 12:21:48 +00:00
|
|
|
//domain <- support 의존
|
|
|
|
project(":domain") {
|
|
|
|
dependencies {
|
|
|
|
implementation(project(":support"))
|
|
|
|
}
|
2022-09-21 12:04:29 +00:00
|
|
|
}
|
2022-09-21 12:21:48 +00:00
|
|
|
|
|
|
|
//support
|
|
|
|
project(":support") {
|
|
|
|
val jar: Jar by tasks
|
|
|
|
val bootJar: BootJar by tasks
|
|
|
|
|
|
|
|
bootJar.enabled = false
|
|
|
|
jar.enabled = true
|
|
|
|
}
|