-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
50 lines (43 loc) · 1.14 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
plugins {
id("java")
id("com.diffplug.spotless") version "6.13.0"
}
group = "io.github.shirohoo"
version = "1.0-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
maven("https://plugins.gradle.org/m2/")
}
dependencies {
testImplementation("org.assertj:assertj-core:3.23.1")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0")
}
tasks.test {
useJUnitPlatform()
}
spotless {
java {
palantirJavaFormat()
indentWithSpaces()
formatAnnotations()
removeUnusedImports()
trimTrailingWhitespace()
custom("noWildcardImports") {
when {
it.contains("*;\n") -> throw Error("No wildcard imports allowed. remove wildcard imports and run `./gradlew spotlessApply`")
else -> it
}
}
bumpThisNumberIfACustomStepChanges(1)
}
kotlinGradle {
ktlint()
indentWithSpaces()
trimTrailingWhitespace()
}
}