-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
49 lines (40 loc) · 1.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
@file:Suppress("ktlint:standard:property-naming")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val GROUP: String by project
val VERSION_NAME: String by project
plugins {
kotlin("jvm") version libs.versions.kotlin.get()
alias(libs.plugins.spotless)
alias(libs.plugins.compatibility.validator)
alias(libs.plugins.mavenPublish) apply false
}
group = GROUP
version = VERSION_NAME
repositories {
mavenCentral()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
subprojects {
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
target("src/**/*.kt")
ktlint()
indentWithSpaces()
endWithNewline()
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
}
format("misc") {
target("*.md", ".gitignore", "*.xml", "*.gradle")
trimTrailingWhitespace()
endWithNewline()
}
kotlinGradle {
ktlint()
trimTrailingWhitespace()
endWithNewline()
}
}
}