This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
generated from arrow-kt/Arrow-JVM-Template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
102 lines (92 loc) · 2.5 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
101
102
import io.gitlab.arturbosch.detekt.Detekt
import org.gradle.api.JavaVersion.VERSION_1_8
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.kotest.multiplatform)
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.arrowGradleConfig.kotlin)
alias(libs.plugins.arrowGradleConfig.formatter)
alias(libs.plugins.arrowGradleConfig.publish)
alias(libs.plugins.arrowGradleConfig.nexus)
alias(libs.plugins.arrowGradleConfig.versioning)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
alias(libs.plugins.kover)
}
infix fun <T> Property<T>.by(value: T) {
set(value)
}
allprojects {
extra.set("dokka.outputDirectory", rootDir.resolve("docs"))
java {
sourceCompatibility = VERSION_1_8
targetCompatibility = VERSION_1_8
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
}
}
kotlin {
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlibCommon)
implementation(libs.coroutines.core)
}
}
commonTest {
dependencies {
implementation(libs.coroutines.core)
implementation(libs.arrow.core)
implementation(libs.arrow.fx)
implementation(libs.kotest.frameworkEngine)
implementation(libs.kotest.assertionsCore)
implementation(libs.kotest.property)
}
}
jvmTest {
dependencies {
implementation(libs.kotest.runnerJUnit5)
}
}
}
}
detekt {
buildUponDefaultConfig = true
allRules = true
}
tasks {
withType<DokkaTask>().configureEach {
outputDirectory.set(rootDir.resolve("docs"))
moduleName.set("Saga")
dokkaSourceSets {
named("commonMain") {
includes.from("README.md")
perPackageOption {
matchingRegex.set(".*\\.internal.*")
suppress.set(true)
}
sourceLink {
localDirectory.set(file("src/commonMain/kotlin"))
remoteUrl.set(uri("https://github.com/nomisRev/Saga/tree/main/src/commonMain/kotlin").toURL())
remoteLineSuffix.set("#L")
}
}
}
}
register<Delete>("cleanDocs") {
val folder = file("docs").also { it.mkdir() }
val docsContent = folder.listFiles().filter { it != folder }
delete(docsContent)
}
withType<Detekt>().configureEach {
reports {
html.required by true
sarif.required by true
txt.required by false
xml.required by false
}
}
}