From 2bab59fee39cd60ad80327d528771015a5903639 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Mon, 29 Apr 2019 11:29:23 +0200 Subject: Fix for analysis platform --- .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 6 +++++- .../org/jetbrains/dokka/gradle/configurationImplementations.kt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'runners/gradle-plugin/src/main') 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 b7e859e1..f7999f59 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 @@ -14,6 +14,7 @@ import org.gradle.api.tasks.compile.AbstractCompile import org.jetbrains.dokka.DokkaBootstrap import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.DokkaConfiguration.SourceRoot +import org.jetbrains.dokka.Platform import org.jetbrains.dokka.ReflectDsl import org.jetbrains.dokka.ReflectDsl.isNotInstance import java.io.File @@ -241,11 +242,14 @@ open class DokkaTask : DefaultTask() { passConfig.collectInheritedExtensionsFromLibraries = collectInheritedExtensionsFromLibraries passConfig.suppressedFiles = collectSuppressedFiles(passConfig.sourceRoots) passConfig.externalDocumentationLinks.addAll(externalDocumentationLinks) + if(passConfig.platform.isNotEmpty()){ + passConfig.analysisPlatform = Platform.fromString(passConfig.platform) + } return passConfig } - private fun collectSourceRoots(): List { + private fun collectSourceRoots(): List { val sourceDirs = when { sourceDirs.any() -> { logger.info("Dokka: Taking source directories provided by the user") diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt index 50412734..887e4d9b 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt @@ -41,6 +41,7 @@ open class GradlePassConfigurationImpl(@Transient val name: String = ""): PassCo override var suppressedFiles: List = emptyList() override var collectInheritedExtensionsFromLibraries: Boolean = false override var analysisPlatform: Platform = Platform.DEFAULT + var platform: String = "" override var targets: List = emptyList() override var sinceKotlin: String = "1.0" -- cgit