forked from kordlib/Lavalink.kt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
81 lines (66 loc) · 2.05 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
import org.ajoberstar.gradle.git.publish.GitPublishExtension
plugins {
id("org.jetbrains.dokka")
id("kotlinx-atomicfu") version "0.17.0" apply false
id("org.ajoberstar.git-publish") version "2.1.3"
}
group = "dev.schlaubi.lavakord"
version = "3.5.0"
allprojects {
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
}
tasks {
dokkaHtmlMultiModule {
outputDirectory.set(rootProject.file("docs"))
}
val docs = task<Copy>("createDocsIndex") {
dependsOn(dokkaHtmlMultiModule)
val outputDirectory = dokkaHtmlMultiModule.get().outputDirectory.get()
from(outputDirectory, rootProject.projectDir)
include("CNAME", "-modules.html")
into(outputDirectory)
rename("-modules.html", "index.html")
}
gitPublishPush {
dependsOn(docs)
}
}
configure<GitPublishExtension> {
repoUri.set("https://github.com/DRSchlaubi/lavakord.git")
branch.set("gh-pages")
contents {
from(file("docs"))
}
commitMessage.set("Update Docs")
}
subprojects {
group = rootProject.group
tasks {
withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
includeNonPublic.set(false)
perPackageOption {
matchingRegex.set(".*\\.internal.*") // will match all .internal packages and sub-packages
suppress.set(true)
}
}
if (asMap.containsKey("jsMain")) {
named("jsMain") {
displayName.set("JS")
}
}
if (asMap.containsKey("jvmMain")) {
named("jvmMain") {
jdkVersion.set(8)
displayName.set("JVM")
}
}
}
}
}
}