-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
105 lines (84 loc) · 3.12 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
val googleJavaFormatVersion = "1.18.1"
plugins {
java
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
id ("com.diffplug.spotless")
}
apply(plugin = "java")
apply(plugin = "com.diffplug.spotless")
group = "${property("projectGroup")}"
version = "${property("applicationVersion")}"
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
val archunitVersion = "${property("archunitVersion")}"
val fixtureMonkeyVersion = "${property("fixturemonkeyVersion")}"
val jacksonCoreVersion = "${property("jacksonDataBindVersion")}"
val okHttpVersion = "${property("okHttp3Version")}"
val gsonVersion = "${property("gsonVersion")}"
val bouncycastleVersion = "${property("bouncycastleVersion")}"
val jsonwebtokenVersion = "${property("jsonwebtokenVersion")}"
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.retry:spring-retry")
implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonCoreVersion}")
implementation ("com.squareup.okhttp3:okhttp:${okHttpVersion}")
implementation ("com.google.code.gson:gson:${gsonVersion}")
implementation("org.bouncycastle:bcprov-jdk18on:${bouncycastleVersion}")
implementation("org.bouncycastle:bcpkix-jdk18on:${bouncycastleVersion}")
compileOnly("org.projectlombok:lombok")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("com.mysql:mysql-connector-j")
annotationProcessor("org.projectlombok:lombok")
implementation("io.jsonwebtoken:jjwt-api:${jsonwebtokenVersion}")
runtimeOnly("io.jsonwebtoken:jjwt-impl:${jsonwebtokenVersion}")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:${jsonwebtokenVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("com.tngtech.archunit:archunit:${archunitVersion}")
testImplementation("com.navercorp.fixturemonkey:fixture-monkey-starter:${fixtureMonkeyVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("com.h2database:h2")
}
spotless{
java {
target("**/*.java")
googleJavaFormat(googleJavaFormatVersion)
importOrder("sopt", "java", "javax", "jakarta", "org", "com")
endWithNewline()
removeUnusedImports()
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.register<Copy>("updateGitHooks") {
from(".github/script/pre-commit")
into(".git/hooks")
}
tasks.register<Exec>("makeGitHooksExecutable") {
commandLine("chmod", "+x", ".git/hooks/pre-commit")
dependsOn("updateGitHooks")
}
tasks.named("compileJava") {
dependsOn("makeGitHooksExecutable")
}
// *-SNAPSHOT-plain.jar 생성 방지
tasks.getByName<Jar>("jar"){
enabled=false
}