-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
66 lines (55 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
import java.net.URL
plugins {
kotlin("jvm") version "1.5.31"
id("org.jetbrains.dokka") version "1.5.31"
}
group = "me.kggilmer"
version = "1.0-SNAPSHOT"
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
when (this.name) {
"dokkaHtmlPartial" -> {
dokkaSourceSets.configureEach {
externalDocumentationLink {
packageListUrl.set(URL("https://raw.githubusercontent.com/kggilmer/repo_a/main/docs/html/package-list"))
url.set(URL("https://kggilmer.github.io/repo_a/html/"))
}
}
}
"dokkaGfmPartial" -> {
dokkaSourceSets.configureEach {
externalDocumentationLink {
packageListUrl.set(URL("https://raw.githubusercontent.com/kggilmer/repo_a/main/docs/gfm/package-list"))
url.set(URL("https://kggilmer.github.io/repo_a/gfm/"))
}
}
}
else -> {
println("Unconfigured task name $name")
}
}
}
}
tasks.getByName<Delete>("clean") {
delete.add(projectDir.resolve("docs/gfm"))
delete.add(projectDir.resolve("docs/html"))
}
tasks.dokkaGfmMultiModule.configure {
outputDirectory.set(projectDir.resolve("docs/gfm"))
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(projectDir.resolve("docs/html"))
}
tasks.register("gen-docs") {
dependsOn("dokkaGfmMultiModule")
dependsOn("dokkaHtmlMultiModule")
}