From 42e5e47e2c8921596b7b5d5e4394e872f686b07d Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Wed, 3 Jul 2019 11:45:00 +0200 Subject: Fix bug with common platform sourceSets --- .../main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt | 2 +- .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'runners/gradle-plugin/src/main') diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt index 491aaae0..ba931313 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt @@ -58,7 +58,7 @@ object ConfigurationExtractor { PlatformData(it.name, getClasspath(it), getSourceSet(it), it.platformType.toString()) } - return config + PlatformData("common", getSourceSet(commonTarget), getClasspath(commonTarget), "common") + return config + PlatformData("common", getClasspath(commonTarget), getSourceSet(commonTarget), "common") } fun extractFromKotlinTasks(kotlinTasks: List, project: Project): PlatformData? { 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 6e36fb68..6bad548a 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 @@ -255,7 +255,8 @@ open class DokkaTask : DefaultTask() { if (config.moduleName == "") { config.moduleName = moduleName } - config.classpath = (config.classpath as List).map { it.toString() } // Workaround for Groovy's GStringImpl + config.classpath = (config.classpath as List).map { it.toString() }.distinct() // Workaround for Groovy's GStringImpl + config.sourceRoots = config.sourceRoots.distinct().toMutableList() config.samples = config.samples.map { project.file(it).absolutePath } config.includes = config.includes.map { project.file(it).absolutePath } config.suppressedFiles += collectSuppressedFiles(config.sourceRoots) -- cgit