-
Notifications
You must be signed in to change notification settings - Fork 437
/
build.gradle.kts
92 lines (77 loc) · 2.32 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
buildscript {
repositories {
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
classpath(libs.kotlinx.knit)
}
}
allprojects {
repositories {
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
}
}
plugins {
base
alias(libs.plugins.dokka)
alias(libs.plugins.animalSniffer) apply false
alias(libs.plugins.kotest.multiplatform) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.binaryCompatibilityValidator)
alias(libs.plugins.arrowGradleConfig.nexus)
alias(libs.plugins.arrowGradleConfig.versioning)
}
apply(plugin = libs.plugins.kotlinx.knit.get().pluginId)
configure<kotlinx.knit.KnitPluginExtension> {
siteRoot = "https://arrow-kt.io/"
rootDir = file("arrow-libs")
files = fileTree(file("arrow-libs")) {
include("**/*.md")
include("**/*.kt")
include("**/*.kts")
exclude("**/build/**")
exclude("**/.gradle/**")
}
}
allprojects {
group = property("projects.group").toString()
}
tasks {
val generateDoc by creating(Exec::class) {
group = "documentation"
commandLine("sh", "gradlew", "dokkaGfm")
}
val buildDoc by creating(Exec::class) {
group = "documentation"
description = "Generates and validates the documentation"
dependsOn(generateDoc)
}
val undocumentedProjects = listOf(
project(":arrow-core-test"),
project(":arrow-fx-coroutines-test"),
project(":arrow-optics-test"),
project(":arrow-optics-ksp-plugin"),
)
dokkaGfmMultiModule { removeChildTasks(undocumentedProjects) }
dokkaHtmlMultiModule { removeChildTasks(undocumentedProjects) }
dokkaJekyllMultiModule { removeChildTasks(undocumentedProjects) }
}
apiValidation {
ignoredProjects.addAll(listOf("arrow-optics-ksp-plugin", "arrow-optics-test", "arrow-site"))
}
val appleTest = tasks.create("appleTest")
subprojects {
afterEvaluate {
val appleTargets = setOf("tvos", "watchos", "ios", "macos")
extensions.findByType<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension>()
?.sourceSets
?.filter { appleTargets.any { target -> it.name.contains(target) } && it.name.contains("Test") }
?.forEach {
tasks.findByName(it.name)?.let { task ->
appleTest.dependsOn(task)
}
}
}
}