diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-03-22 11:58:29 +0100 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-03-27 15:18:59 +0100 |
commit | 93bef428ae2e1f4952a22adfd4a2aa679ddd7605 (patch) | |
tree | 0460ebc4f59e943ce426a459f87fbfbcde76e53a /integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt | |
parent | 23219d692d809da29151add0d112c7983f214577 (diff) | |
download | dokka-93bef428ae2e1f4952a22adfd4a2aa679ddd7605.tar.gz dokka-93bef428ae2e1f4952a22adfd4a2aa679ddd7605.tar.bz2 dokka-93bef428ae2e1f4952a22adfd4a2aa679ddd7605.zip |
Rework configuration, fix Gradle plugin
Diffstat (limited to 'integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt')
-rw-r--r-- | integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt new file mode 100644 index 00000000..615f0215 --- /dev/null +++ b/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt @@ -0,0 +1,79 @@ +package org.jetbrains.dokka + +import kotlinx.serialization.Serializable +import java.io.File +import java.net.URL + +@Serializable +data class DokkaConfigurationImpl( + override val outputDir: String, + override val format: String, + override val generateIndexPages: Boolean, + override val cacheRoot: String?, + override val impliedPlatforms: List<String>, + override val passesConfigurations: List<PassConfigurationImpl> +) : DokkaConfiguration + +@Serializable +data class PassConfigurationImpl ( + override val moduleName: String, + override val classpath: List<String>, + override val sourceRoots: List<SourceRootImpl>, + override val samples: List<String>, + override val includes: List<String>, + override val includeNonPublic: Boolean, + override val includeRootPackage: Boolean, + override val reportUndocumented: Boolean, + override val skipEmptyPackages: Boolean, + override val skipDeprecated: Boolean, + override val jdkVersion: Int, + override val sourceLinks: List<SourceLinkDefinitionImpl>, + override val perPackageOptions: List<PackageOptionsImpl>, + override var externalDocumentationLinks: List<ExternalDocumentationLinkImpl>, + override val languageVersion: String?, + override val apiVersion: String?, + override val noStdlibLink: Boolean, + override val noJdkLink: Boolean, + override val suppressedFiles: List<String>, + override val collectInheritedExtensionsFromLibraries: Boolean, + override val analysisPlatform: Platform, + override val targets: List<String>, + override val sinceKotlin: String +) : DokkaConfiguration.PassConfiguration + +@Serializable +data class SourceRootImpl( + override val path: String +): DokkaConfiguration.SourceRoot + +@Serializable +data class SourceLinkDefinitionImpl( + override val path: String, + override val url: String, + override val lineSuffix: String? +): DokkaConfiguration.SourceLinkDefinition { + companion object { + fun parseSourceLinkDefinition(srcLink: String): SourceLinkDefinitionImpl { + val (path, urlAndLine) = srcLink.split('=') + return SourceLinkDefinitionImpl( + File(path).canonicalPath, + urlAndLine.substringBefore("#"), + urlAndLine.substringAfter("#", "").let { if (it.isEmpty()) null else "#$it" }) + } + } +} + +@Serializable +data class PackageOptionsImpl( + override val prefix: String, + override val includeNonPublic: Boolean, + override val reportUndocumented: Boolean, + override val skipDeprecated: Boolean, + override val suppress: Boolean +): DokkaConfiguration.PackageOptions + + +@Serializable +data class ExternalDocumentationLinkImpl(@Serializable(with = UrlSerializer::class) override val url: URL, + @Serializable(with = UrlSerializer::class) override val packageListUrl: URL +) : DokkaConfiguration.ExternalDocumentationLink
\ No newline at end of file |