aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-05-19 18:17:26 +0200
committerKamil Doległo <kamilok1965@interia.pl>2020-05-19 18:17:26 +0200
commitff450fedb3c8bdc318b55954bc37d93b30b9277c (patch)
treefd7e593e9b88034a2e925bff88bae2093a336ed7 /runners/gradle-plugin
parent3aeb65472be150a6098f2fac17dbdf0bb2a40013 (diff)
downloaddokka-ff450fedb3c8bdc318b55954bc37d93b30b9277c.tar.gz
dokka-ff450fedb3c8bdc318b55954bc37d93b30b9277c.tar.bz2
dokka-ff450fedb3c8bdc318b55954bc37d93b30b9277c.zip
Fix sourceRootName extraction
Diffstat (limited to 'runners/gradle-plugin')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
index 356661da..109e7838 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
@@ -283,7 +283,7 @@ open class DokkaTask : DefaultTask(), Configurable {
config.moduleName = project.name
}
if (config.sourceSetName.isEmpty()) {
- config.sourceSetName = config.platform ?: config.name
+ config.sourceSetName = config.name.substringBeforeLast("Main").takeIf(String::isNotBlank) ?: config.platform.toString()
}
config.classpath = (config.classpath as List<Any>).map { it.toString() }.distinct() // Workaround for Groovy's GStringImpl
config.sourceRoots = config.sourceRoots.distinct().toMutableList()