-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
52 lines (42 loc) · 1.16 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
plugins {
id("java")
id("com.diffplug.spotless") version "6.11.0"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("net.bytebuddy:byte-buddy:1.14.6")
implementation("org.reflections:reflections:0.10.2")
implementation("mysql:mysql-connector-java:8.0.33")
compileOnly("javax.servlet:javax.servlet-api:4.0.1")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
spotless {
java {
target("src/main/java/org/example/**/*.java")
palantirJavaFormat()
// Import 정렬 순서
importOrder("lombok", "org", "com", "java", "javax", "org.example")
// 사용하지 않는 Import 제거
removeUnusedImports()
// Custom Rule도 생성할 수 있다.
custom("noWildcardImports") {
when {
it.contains("*;\n") -> throw Error("No wildcard imports allowed")
else -> it
}
}
}
}
tasks.test {
useJUnitPlatform()
}