Skip to content

Instantly share code, notes, and snippets.

@asvid
Created November 12, 2018 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asvid/fe880bb2f1d2d41ce2a18cd1883df711 to your computer and use it in GitHub Desktop.
Save asvid/fe880bb2f1d2d41ce2a18cd1883df711 to your computer and use it in GitHub Desktop.
apply plugin: 'org.jetbrains.dokka-android'
dokka {
moduleName = ""
outputDirectory = "$rootDir/docs"
outputFormat = "html"
includes = ['extra.md']
samples = ['src/sample']
includeNonPublic = false
skipDeprecated = false
reportUndocumented = false
skipEmptyPackages = true
externalDocumentationLink {
url = new URL("https://docs.oracle.com/javase/7/docs/api/")
}
externalDocumentationLink {
url = new URL("http://reactivex.io/RxJava/javadoc/")
}
externalDocumentationLink {
url = new URL("http://jakewharton.github.io/timber/")
}
def appPath = new File(project.projectDir, "/src/main/java")
def relativeAppPath = rootDir.toPath().relativize(appPath.toPath()).toString()
linkMapping {
dir = appPath
url = "https://github.com/asvid/GdzieTaBiedra/tree/master/$relativeAppPath"
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/asvid/GdzieTaBiedra/tree/master/$relativePath"
suffix = "#L"
}
return path
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment