aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Elizarov <elizarov@gmail.com>2017-12-22 16:15:02 +0300
committerSimon Ogorodnik <simon.ogorodnik@gmail.com>2017-12-22 16:21:12 +0300
commit4a425e29fba4030d9cde7072ee6bf39ab7ae3668 (patch)
tree34a2ec8c5a51a79e3f02fba0eee1025b84568139
parentdcaa940db179cf346f9a0e8f98988d17a3cb2719 (diff)
downloaddokka-4a425e29fba4030d9cde7072ee6bf39ab7ae3668.tar.gz
dokka-4a425e29fba4030d9cde7072ee6bf39ab7ae3668.tar.bz2
dokka-4a425e29fba4030d9cde7072ee6bf39ab7ae3668.zip
Supports hacks for MPP documentation generation
-rw-r--r--core/src/main/kotlin/Analysis/AnalysisEnvironment.kt8
-rw-r--r--runners/gradle-plugin/src/main/kotlin/main.kt2
2 files changed, 5 insertions, 5 deletions
diff --git a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
index 3b9b9149..56249ac4 100644
--- a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
+++ b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
@@ -114,15 +114,15 @@ class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable {
val javaRoots = classpath
- .map {
+ .mapNotNull {
val rootFile = when {
it.extension == "jar" ->
- StandardFileSystems.jar().findFileByPath("${it.absolutePath}${URLUtil.JAR_SEPARATOR}")!!
+ StandardFileSystems.jar().findFileByPath("${it.absolutePath}${URLUtil.JAR_SEPARATOR}")
else ->
- StandardFileSystems.local().findFileByPath(it.absolutePath)!!
+ StandardFileSystems.local().findFileByPath(it.absolutePath)
}
- JavaRoot(rootFile, JavaRoot.RootType.BINARY)
+ rootFile?.let { JavaRoot(it, JavaRoot.RootType.BINARY) }
}
val resolverForProject = ResolverForProjectImpl(
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt
index 057efb98..78bf4978 100644
--- a/runners/gradle-plugin/src/main/kotlin/main.kt
+++ b/runners/gradle-plugin/src/main/kotlin/main.kt
@@ -379,7 +379,7 @@ open class DokkaTask : DefaultTask() {
}
}
-class SourceRoot : DokkaConfiguration.SourceRoot {
+class SourceRoot : DokkaConfiguration.SourceRoot, Serializable {
override var path: String = ""
set(value) {
field = File(value).absolutePath