generated from arrow-kt/Arrow-KMP-Template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
75 lines (66 loc) · 1.79 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
import org.jetbrains.dokka.gradle.DokkaTask
import kotlinx.knit.KnitPluginExtension
plugins {
base
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotest.multiplatform)
alias(libs.plugins.arrow.config.kotlin)
alias(libs.plugins.arrow.config.publish)
alias(libs.plugins.arrow.config.nexus)
alias(libs.plugins.dokka)
alias(libs.plugins.kotlinx.knit)
}
repositories {
mavenCentral()
}
kotlin {
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlib)
api(libs.arrow.core)
}
}
commonTest {
dependencies {
implementation(libs.kotest.assertions)
implementation(libs.kotest.property)
implementation(libs.kotest.engine)
implementation(libs.kotest.datatest)
implementation(libs.kotest.arrow)
}
}
val jvmTest by getting {
dependencies {
implementation(libs.kotest.junit5)
implementation(libs.kotlinx.knit.test)
}
}
}
}
configure<KnitPluginExtension> {
siteRoot = "https://arrow-kt.github.io/arrow-exact/"
}
tasks {
afterEvaluate {
withType<DokkaTask>().configureEach {
outputDirectory.set(rootDir.resolve("docs"))
moduleName.set("Arrow Exact")
dokkaSourceSets {
named("commonMain") {
includes.from("README.md")
externalDocumentationLink("https://apidocs.arrow-kt.io")
sourceLink {
localDirectory.set(file("src/commonMain/kotlin"))
remoteUrl.set(uri("https://github.com/arrow-kt/arrow-exact/tree/main/src/commonMain/kotlin").toURL())
remoteLineSuffix.set("#L")
}
}
}
}
}
getByName("knitPrepare").dependsOn(getTasksByName("dokka", true))
}
tasks.withType<AbstractPublishToMaven> {
dependsOn(tasks.withType<Sign>())
}