diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-04-29 11:29:23 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-04-29 11:31:26 +0200 |
commit | 2bab59fee39cd60ad80327d528771015a5903639 (patch) | |
tree | 56395a99ba22930af2dc7a6b7bd504b96aef51cf /runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka | |
parent | 06af978842577ad19639b827cf33c4514347afa4 (diff) | |
download | dokka-2bab59fee39cd60ad80327d528771015a5903639.tar.gz dokka-2bab59fee39cd60ad80327d528771015a5903639.tar.bz2 dokka-2bab59fee39cd60ad80327d528771015a5903639.zip |
Fix for analysis platform
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 6 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt | 1 |
2 files changed, 6 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 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<DokkaConfiguration.SourceRoot> { + private fun collectSourceRoots(): List<SourceRoot> { 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<String> = emptyList() override var collectInheritedExtensionsFromLibraries: Boolean = false override var analysisPlatform: Platform = Platform.DEFAULT + var platform: String = "" override var targets: List<String> = emptyList() override var sinceKotlin: String = "1.0" |