-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDokkaConfig.gradle
48 lines (40 loc) · 1.71 KB
/
DokkaConfig.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
apply plugin: 'org.jetbrains.dokka-android'
dokka {
outputFormat = 'markdown'
outputDirectory = "docs"
includeNonPublic = false
skipDeprecated = false
reportUndocumented = false
skipEmptyPackages = true
// Specifies the location of the project source code on the Web.
// If provided, Dokka generates "source" links for each declaration.
// Repeat for multiple mappings
def appPath = new File(project.projectDir, "/src/main/java")
def relativeAppPath = rootDir.toPath().relativize(appPath.toPath()).toString()
linkMapping {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
dir = appPath // or simply "./"
// URL showing where the source code can be accessed through the web browser
url = "https://github.com/adaptmobile-organization/amkotlinutil/tree/master/$relativeAppPath"
//remove src/main/kotlin if you use "./" above
// Suffix which is used to append the line number to the URL. Use #L for GitHub
suffix = "#L"
}
Set<ProjectDependency> deps =
project.configurations.collectMany {
it.allDependencies
}.findAll {
it instanceof ProjectDependency
}
sourceDirs = files(deps.collect {
p ->
def path = new File(p.getDependencyProject().projectDir, "/src/main/java")
def relativePath = rootDir.toPath().relativize(path.toPath()).toString()
linkMapping {
dir = path
url = "https://github.com/adaptmobile-organization/amkotlinutil/tree/master/$relativePath"
suffix = "#L"
}
return path
})
}