-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
91 lines (76 loc) · 2.32 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
91 lines (76 loc) · 2.32 KB
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
`version-catalog`
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlinter)
alias(libs.plugins.detekt)
alias(libs.plugins.gradleVersions)
alias(libs.plugins.gradleVersions.filter)
alias(libs.plugins.gradleVersions.update)
alias(libs.plugins.binaryCompatibilityValidator)
}
repositories {
mavenLocal()
mavenCentral()
}
apiValidation {
apiDumpDirectory = ".api-validation"
nonPublicMarkers += "net.aholbrook.paseto.InternalApi"
ignoredProjects.addAll(listOf("vector-gen"))
}
allprojects {
apply(plugin = "java")
apply(plugin = "org.jmailen.kotlinter")
apply(plugin = "io.gitlab.arturbosch.detekt")
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
with (rootProject) {
testImplementation(libs.kotest.assertions.core)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testRuntimeOnly(libs.junit.jupiter.engine)
testRuntimeOnly(libs.junit.platform.launcher)
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(rootProject.libs.versions.jvm.get()))
}
}
tasks {
withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(
JvmTarget.valueOf(
"JVM_" + rootProject.libs.versions.jvm.get().replace('.', '_')
)
)
}
}
withType<JavaCompile> { options.encoding = "UTF-8" }
withType<Test>().configureEach {
useJUnitPlatform()
jvmArgs = listOf("-Xshare:off")
testLogging {
events("failed", "skipped")
showExceptions = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showCauses = true
showStackTraces = true
showStandardStreams = true
}
}
}
detekt {
buildUponDefaultConfig = true
config.setFrom(files("${project.rootDir}/detekt-config.yml"))
}
}
tasks.check {
dependsOn(tasks.apiCheck)
}