-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathbuild.gradle.kts
executable file
·111 lines (88 loc) · 3.4 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
103
104
105
106
107
108
109
110
111
import org.jetbrains.dokka.DokkaConfiguration.Visibility.PROTECTED
import org.jetbrains.dokka.DokkaConfiguration.Visibility.PUBLIC
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import java.net.URL
plugins {
alias(libs.plugins.dokka)
alias(libs.plugins.kover)
signing
}
repositories {
mavenCentral()
}
buildscript {
dependencies {
classpath("org.jetbrains.dokka:dokka-base:${libs.versions.dokkaVersion.get()}")
}
}
fun DokkaBaseConfiguration.configDokka() {
homepageLink = "https://github.com/nacular/doodle"
customAssets = listOf(file("logo-icon.svg"))
footerMessage = "(c) 2024 Nacular"
separateInheritedMembers = true
mergeImplicitExpectActualDeclarations = true
}
tasks.withType<DokkaMultiModuleTask>().configureEach {
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
configDokka()
}
}
subprojects {
apply (plugin = "maven-publish" )
apply (plugin = "signing" )
apply (plugin = "org.jetbrains.dokka" )
apply (plugin = "org.jetbrains.kotlinx.kover")
repositories {
mavenCentral()
maven ("https://maven.pkg.jetbrains.space/public/p/compose/dev")
mavenLocal ()
}
val dokkaJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka"
archiveClassifier.set("javadoc")
from(tasks.dokkaHtml)
}
setupPublication(dokkaJar)
setupSigning()
tasks.withType<DokkaTaskPartial>().configureEach {
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
configDokka()
}
outputDirectory.set(layout.buildDirectory.dir("javadoc"))
dokkaSourceSets.configureEach {
// Do not output deprecated members. Applies globally, can be overridden by packageOptions
skipDeprecated.set(false)
// Emit warnings about not documented members. Applies globally, also can be overridden by packageOptions
reportUndocumented.set(true)
// Do not create index pages for empty packages
skipEmptyPackages.set(true)
includes.from("Module.md")
documentedVisibilities.set(setOf(PUBLIC, PROTECTED))
sourceLink {
localDirectory.set(rootProject.projectDir)
remoteUrl.set(URL("https://github.com/nacular/doodle/tree/master"))
remoteLineSuffix.set("#L")
}
externalDocumentationLink {
url.set(URL("https://kotlinlang.org/api/latest/jvm/stdlib/"))
}
externalDocumentationLink {
url.set(URL("https://kotlinlang.org/api/kotlinx-datetime"))
packageListUrl.set(URL("https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/package-list"))
}
externalDocumentationLink {
url.set(URL("https://nacular.github.io/measured-api"))
packageListUrl.set(URL("https://nacular.github.io/measured-api/package-list"))
}
}
}
}
dependencies {
subprojects.forEach {
kover(project(":${it.name}"))
}
}