-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
81 lines (68 loc) · 2.11 KB
/
build.gradle.kts
File metadata and controls
81 lines (68 loc) · 2.11 KB
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
import org.jlleitschuh.gradle.ktlint.KtlintExtension
buildscript {
repositories {
mavenCentral()
}
}
plugins {
kotlin("jvm") version PluginVersions.JPA_PLUGIN_VERSION
kotlin("plugin.spring") version PluginVersions.JPA_PLUGIN_VERSION
kotlin("plugin.jpa") version PluginVersions.JPA_PLUGIN_VERSION
id("org.springframework.boot") version "3.2.1"
id("io.spring.dependency-management") version "1.1.7"
id("org.jlleitschuh.gradle.ktlint") version "11.6.0" apply false
}
allprojects {
group = "finda"
version = "0.0.1-SNAPSHOT"
repositories {
mavenCentral()
}
if (project.name != "finda-security-common") {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
apply(plugin = "org.jetbrains.kotlin.plugin.jpa")
apply(plugin = "org.springframework.boot")
apply(plugin = "io.spring.dependency-management")
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
} else {
// finda-security-common: java-library 모듈 설정
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "java-library")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict", "-Xannotation-default-target=param-property")
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
extensions.configure<KtlintExtension>("ktlint") {
android.set(false)
outputToConsole.set(true)
enableExperimentalRules.set(true)
ignoreFailures.set(false)
}
}
tasks.named<Jar>("jar") {
enabled = false
}
tasks.named<org.springframework.boot.gradle.tasks.bundling.BootJar>("bootJar") {
enabled = false
} // root에서는 직접적인 코드 작성이 없으니 jar을 비활성화한다