aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/documentables
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-18 12:18:59 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-14 17:51:11 +0200
commiteae1ce49d18c2978b49166ea502bf2c109a85504 (patch)
tree477f39e33f14c71042f06eecc938d6efaa95e66c /plugins/base/src/main/kotlin/transformers/documentables
parent6c635551ed3ea0cfe5f04b54a98cb28225061d26 (diff)
downloaddokka-eae1ce49d18c2978b49166ea502bf2c109a85504.tar.gz
dokka-eae1ce49d18c2978b49166ea502bf2c109a85504.tar.bz2
dokka-eae1ce49d18c2978b49166ea502bf2c109a85504.zip
Simplify Dokka Gradle Plugin
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt6
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/SuppressedDocumentableFilterTransformer.kt2
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt
index 4a98a5e0..71824922 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt
@@ -22,9 +22,9 @@ internal class ModuleAndPackageDocumentationTransformer(
val modulesAndPackagesDocumentation =
context.configuration.sourceSets
- .map {
- Pair(it.moduleDisplayName, it) to
- it.includes.map { Paths.get(it) }
+ .map { sourceSet ->
+ Pair(sourceSet.moduleDisplayName, sourceSet) to
+ sourceSet.includes.map { it.toPath() }
.also {
it.forEach {
if (Files.notExists(it))
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/SuppressedDocumentableFilterTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/SuppressedDocumentableFilterTransformer.kt
index 79feb832..7febabbb 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/SuppressedDocumentableFilterTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/SuppressedDocumentableFilterTransformer.kt
@@ -45,7 +45,7 @@ class SuppressedDocumentableFilterTransformer(val context: DokkaContext) : PreMe
if (documentable !is WithExpectActual) return false
val sourceFile = File(source(documentable).path).absoluteFile
return sourceSet(documentable).suppressedFiles.any { suppressedFile ->
- sourceFile.startsWith(File(suppressedFile).absoluteFile)
+ sourceFile.startsWith(suppressedFile.absoluteFile)
}
}
}