forked from a-sit-plus/signum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
48 lines (39 loc) · 1.24 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
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
plugins {
id("at.asitplus.gradle.conventions") version "2.0.20+20241030"
id("com.android.library") version "8.2.2" apply (false)
}
group = "at.asitplus.signum"
//work around nexus publish bug
val artifactVersion: String by extra
version = artifactVersion
//end work around nexus publish bug
//access dokka plugin from conventions plugin's classpath in root project → no need to specify version
apply(plugin = "org.jetbrains.dokka")
tasks.getByName("dokkaHtmlMultiModule") {
(this as DokkaMultiModuleTask)
outputDirectory.set(File("${buildDir}/dokka"))
moduleName.set("Signum")
}
allprojects {
apply(plugin = "org.jetbrains.dokka")
group = rootProject.group
repositories {
mavenLocal()
}
}
tasks.register<Copy>("copyChangelog") {
into(rootDir.resolve("docs/docs"))
from("CHANGELOG.md")
}
tasks.register<Copy>("mkDocsPrepare") {
dependsOn("dokkaHtmlMultiModule")
dependsOn("copyChangelog")
into(rootDir.resolve("docs/docs/dokka"))
from("${buildDir}/dokka")
}
tasks.register<Exec>("mkDocsBuild") {
dependsOn(tasks.named("mkDocsPrepare"))
workingDir("${rootDir}/docs")
commandLine("mkdocs", "build", "--clean", "--strict")
}