-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdokka.build.gradle
60 lines (51 loc) · 2.23 KB
/
dokka.build.gradle
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
def documentationRoot = "${project.rootDir}/website/hugo-src/static/documentation"
dokka {
// https://github.com/Kotlin/dokka#using-dokka
outputFormat = 'html'
outputDirectory = documentationRoot
subProjects = ["mvflow-core"]
configuration {
jdkVersion = 8
reportUndocumented = true
samples = ['dokka-samples']
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
path = "./"
// URL showing where the source code can be accessed through the web browser
url = "https://github.com/pedroql/mvflow/blob/master/"
// Suffix which is used to append the line number to the URL. Use #L for GitHub
lineSuffix = "#L"
}
// // Disable linking to online kotlin-stdlib documentation
// noStdlibLink = false
//
// // Disable linking to online JDK documentation
// noJdkLink = false
// Allows linking to documentation of the project's dependencies (generated with Javadoc or Dokka)
// Repeat for multiple links
externalDocumentationLink {
// Root URL of the generated documentation to link with. The trailing slash is required!
url = new URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/")
// If package-list file is located in non-standard location
// https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/package-list
// packageListUrl = new URL("file:///home/user/localdocs/package-list")
}
}
}
task removeAbsolutePathsFromDokkaFiles {
doLast {
fileTree(documentationRoot).matching {
include "**/index-outline.html"
}
.forEach { File file ->
//println("Removing hardcoded paths mentioning '${file.parent}/' from file ${file.path}")
ant.replace(
file: file,
// remove the path all the way to the parent of this file
token: "${file.parent}/",
value: ""
)
}
}
}
dokka.finalizedBy removeAbsolutePathsFromDokkaFiles