diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-08-23 14:48:44 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-08-23 14:48:44 +0200 |
commit | 86b34728b0a20b1f857233514eb5b7853e5e334d (patch) | |
tree | 1f0cf9310a816cf81a2381713aa59278cf03d75a /runners/gradle-plugin | |
parent | 64f12cca55573ca40d682e1976d9f437233cc613 (diff) | |
download | dokka-86b34728b0a20b1f857233514eb5b7853e5e334d.tar.gz dokka-86b34728b0a20b1f857233514eb5b7853e5e334d.tar.bz2 dokka-86b34728b0a20b1f857233514eb5b7853e5e334d.zip |
Fix for platforms
Diffstat (limited to 'runners/gradle-plugin')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 9 |
1 files changed, 4 insertions, 5 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 063efa24..017caeed 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 @@ -187,10 +187,10 @@ open class DokkaTask : DefaultTask() { if (multiplatform.toList().isNotEmpty()) collectFromMultiPlatform() else collectFromSinglePlatform() private fun collectFromMultiPlatform(): List<GradlePassConfigurationImpl> { - if (disableAutoconfiguration) return multiplatform.toList() + if (disableAutoconfiguration) return multiplatform.filterNot { it.name.toLowerCase() == GLOBAL_PLATFORM_NAME }.toList() val baseConfig = mergeUserAndAutoConfigurations( - multiplatform.toList(), + multiplatform.filterNot { it.name.toLowerCase() == GLOBAL_PLATFORM_NAME }.toList(), configurationExtractor.extractFromMultiPlatform().orEmpty() ) return if (subProjects.isNotEmpty()) @@ -245,7 +245,7 @@ open class DokkaTask : DefaultTask() { if (autoConfig != null) { mergeUserConfigurationAndPlatformData(userConfig, autoConfig) } else { - if(outputDiagnosticInfo && userConfig.name.toLowerCase() != GLOBAL_PLATFORM_NAME) { + if(outputDiagnosticInfo) { logger.warn( "Could not find platform with name: ${userConfig.name} in Kotlin Gradle Plugin, " + "using only user provided configuration for this platform" @@ -275,7 +275,7 @@ open class DokkaTask : DefaultTask() { config.moduleName = project.name } if (config.targets.isEmpty() && multiplatform.isNotEmpty()){ - config.targets = listOf(config.platform.toString()) + config.targets = listOf(config.name) } config.classpath = (config.classpath as List<Any>).map { it.toString() }.distinct() // Workaround for Groovy's GStringImpl config.sourceRoots = config.sourceRoots.distinct().toMutableList() @@ -289,7 +289,6 @@ open class DokkaTask : DefaultTask() { if (config.platform != null && config.platform.toString().isNotEmpty()) { config.analysisPlatform = Platform.fromString(config.platform.toString()) } - if (globalConfig != null) { config.perPackageOptions.addAll(globalConfig.perPackageOptions) config.externalDocumentationLinks.addAll(globalConfig.externalDocumentationLinks) |