-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
51 lines (41 loc) · 1.29 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.gradleKtlint)
}
internal val kotlinJvmPluginId = libs.plugins.kotlinJvm.get().pluginId
internal val gradleKtLintPluginId = libs.plugins.gradleKtlint.get().pluginId
internal val localJavaVersion = JavaVersion.VERSION_23.majorVersion
internal val toolChainVersionValue = localJavaVersion.toInt()
allprojects {
group = "tw.xcc.gumtree"
version = "0.1.0"
apply {
plugin(kotlinJvmPluginId)
plugin(gradleKtLintPluginId)
}
kotlin { jvmToolchain(toolChainVersionValue) }
tasks.withType<KotlinCompile>().configureEach {
dependsOn(tasks.ktlintFormat)
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(localJavaVersion))
}
}
tasks.withType<JavaCompile>().configureEach {
options.release.set(toolChainVersionValue)
}
tasks.withType(Test::class) {
useJUnitPlatform()
}
ktlint {
filter {
exclude("**/buildSrc/**")
exclude("**/build/**")
exclude("**/generated/**")
exclude("**/generated-src/**")
include("**/kotlin/**")
include("**/*.kts")
}
}
}