-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (84 loc) · 2.85 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
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.compose.ExperimentalComposeLibrary
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
id("org.jlleitschuh.gradle.ktlint") version "11.3.2"
id("io.gitlab.arturbosch.detekt").version("1.22.0")
}
group = "com.rayliu"
version = "1.0.0"
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
kotlin {
jvm {
jvmToolchain(11)
withJava()
}
sourceSets {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5")
}
}
val jvmTest by getting {
@OptIn(ExperimentalComposeLibrary::class)
dependencies {
implementation(compose.uiTestJUnit4)
implementation("io.mockk:mockk:1.13.5")
implementation("junit:junit:4.12")
implementation("com.google.truth:truth:1.1.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
}
}
}
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "IntentSender"
packageVersion = version.toString()
}
buildTypes.release.proguard {
obfuscate.set(true)
}
}
}
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
verbose.set(true)
android.set(false)
outputToConsole.set(true)
outputColorName.set("RED")
ignoreFailures.set(true)
disabledRules.set(setOf("import-ordering"))
reporters {
reporter(ReporterType.JSON)
reporter(ReporterType.HTML)
}
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
detekt {
buildUponDefaultConfig = true // preconfigure defaults
config = files("config/detekt/detekt.yml")
}
tasks.withType<Detekt>().configureEach {
reports {
html.required.set(true) // observe findings in your browser with structure and code snippets
xml.required.set(false) // checkstyle like format mainly for integrations like Jenkins
txt.required.set(false) // similar to the console output, contains issue signature to manually edit baseline files
sarif.required.set(false) // standardized SARIF format (https://sarifweb.azurewebsites.net/) to support integrations with GitHub Code Scanning
md.required.set(true) // simple Markdown format
}
}