-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
100 lines (86 loc) · 3.26 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
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
92
93
94
95
96
97
98
99
100
import com.palantir.gradle.gitversion.GitVersionPlugin
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
jcenter()
}
}
plugins {
kotlin("jvm") version "1.5.20"
kotlin("plugin.serialization") version "1.5.20"
id("org.jetbrains.compose") version "0.5.0-build229"
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
id("io.gitlab.arturbosch.detekt") version "1.17.1"
id("com.palantir.git-version") version "0.12.3"
}
val gitVersion: groovy.lang.Closure<GitVersionPlugin> by extra
group = "com.github.xetra11"
version = gitVersion()
repositories {
jcenter()
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
}
dependencies {
implementation(compose.desktop.currentOs)
implementation("org.slf4j:slf4j-simple:2.0.0-alpha1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1")
testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
testImplementation("org.assertj:assertj-core:3.20.2")
testImplementation("io.kotest:kotest-runner-junit5:4.6.0")
testImplementation("io.kotest:kotest-assertions-core:4.6.0")
testImplementation("io.kotest:kotest-property:4.6.0")
testImplementation("io.mockk:mockk:1.12.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed") // , "standardOut", "standardError"
showExceptions = true
// exceptionFormat = "full"
showCauses = true
showStackTraces = true
showStandardStreams = false
}
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "14"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "ck3-workbench"
windows {
iconFile.set(File("src/main/resources/icons/ck3.ico"))
shortcut = true
dirChooser = true
}
}
}
}
detekt {
failFast = true // fail build on any finding
buildUponDefaultConfig = true // preconfigure defaults
config = files("$projectDir/detekt/detekt.yml") // point to your custom config defining rules to run, overwriting default behavior
baseline = file("$projectDir/detekt/baseline.xml") // a way of suppressing issues before introducing detekt
reports {
html.enabled = true // observe findings in your browser with structure and code snippets
xml.enabled = true // checkstyle like format mainly for integrations like Jenkins
txt.enabled = true // similar to the console output, contains issue signature to manually edit baseline files
}
}
tasks {
withType<Detekt> {
// Target version of the generated JVM bytecode. It is used for type resolution.
this.jvmTarget = "14"
}
}