diff options
author | Eugene Petrenko <eugene.petrenko@gmail.com> | 2018-09-11 14:03:29 +0300 |
---|---|---|
committer | Eugene Petrenko <eugene.petrenko@gmail.com> | 2018-09-11 14:03:29 +0300 |
commit | a54070f5db04d05b48c369b211efe044fbc02a8d (patch) | |
tree | aac5889906f49f68c39e1416ea39d4d19bad008e /integration/src/main | |
parent | e29f1c966056b0f7ee31dd9bd7d55f9e526fa7fe (diff) | |
parent | 0df19264ccae3d294946caf634ee15eea0c4fe4a (diff) | |
download | dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.tar.gz dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.tar.bz2 dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.zip |
Merge remote-tracking branch 'zub/dev-multiplatf' into kotlin-website-jonnyzzz
Diffstat (limited to 'integration/src/main')
-rw-r--r-- | integration/src/main/kotlin/org/jetbrains/dokka/ReflectDsl.kt | 2 | ||||
-rw-r--r-- | integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt | 97 |
2 files changed, 56 insertions, 43 deletions
diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/ReflectDsl.kt b/integration/src/main/kotlin/org/jetbrains/dokka/ReflectDsl.kt index 3c9bf156..1984a3e5 100644 --- a/integration/src/main/kotlin/org/jetbrains/dokka/ReflectDsl.kt +++ b/integration/src/main/kotlin/org/jetbrains/dokka/ReflectDsl.kt @@ -1,6 +1,8 @@ package org.jetbrains.dokka import kotlin.reflect.* +import kotlin.reflect.full.memberFunctions +import kotlin.reflect.full.memberProperties import kotlin.reflect.jvm.isAccessible object ReflectDsl { diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt index 90e5b5fc..5f1f4bb0 100644 --- a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt +++ b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt @@ -17,34 +17,62 @@ class UrlSerializer : ValueSerializer<URL?> { override fun toJsonValue(value: URL?): Any? = value?.toExternalForm() } +enum class Platform(val key: String) { + jvm("jvm"), + js("js"), + common("common"); + + + companion object { + val DEFAULT = jvm + + fun fromString(key: String): Platform { + return when (key.toLowerCase()) { + jvm.key -> jvm + js.key -> js + common.key -> common + else -> TODO("write normal exception") + } + } + } + +} + interface DokkaConfiguration { - val moduleName: String - val classpath: List<String> - val sourceRoots: List<SourceRoot> - val samples: List<String> - val includes: List<String> val outputDir: String val format: String - val includeNonPublic: Boolean - val includeRootPackage: Boolean - val reportUndocumented: Boolean - val skipEmptyPackages: Boolean - val skipDeprecated: Boolean - val jdkVersion: Int val generateIndexPages: Boolean - val sourceLinks: List<SourceLinkDefinition> - val impliedPlatforms: List<String> - val perPackageOptions: List<PackageOptions> - val externalDocumentationLinks: List<DokkaConfiguration.ExternalDocumentationLink> - val languageVersion: String? - val apiVersion: String? - val noStdlibLink: Boolean val cacheRoot: String? - val suppressedFiles: List<String> + val passesConfigurations: List<PassConfiguration> + val impliedPlatforms: List<String> + + interface PassConfiguration { + val moduleName: String + val classpath: List<String> + val sourceRoots: List<SourceRoot> + val samples: List<String> + val includes: List<String> + val includeNonPublic: Boolean + val includeRootPackage: Boolean + val reportUndocumented: Boolean + val skipEmptyPackages: Boolean + val skipDeprecated: Boolean + val jdkVersion: Int + val sourceLinks: List<SourceLinkDefinition> + val perPackageOptions: List<PackageOptions> + val externalDocumentationLinks: List<DokkaConfiguration.ExternalDocumentationLink> + val languageVersion: String? + val apiVersion: String? + val noStdlibLink: Boolean + val noJdkLink: Boolean + val suppressedFiles: List<String> + val collectInheritedExtensionsFromLibraries: Boolean + val analysisPlatform: Platform + val targets: List<String> + } interface SourceRoot { val path: String - val platforms: List<String> } interface SourceLinkDefinition { @@ -82,29 +110,12 @@ interface DokkaConfiguration { } data class SerializeOnlyDokkaConfiguration( - override val moduleName: String, - override val classpath: List<String>, - override val sourceRoots: List<DokkaConfiguration.SourceRoot>, - override val samples: List<String>, - override val includes: List<String>, - override val outputDir: String, - override val format: 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 generateIndexPages: Boolean, - override val sourceLinks: List<DokkaConfiguration.SourceLinkDefinition>, - override val impliedPlatforms: List<String>, - override val perPackageOptions: List<DokkaConfiguration.PackageOptions>, - override val externalDocumentationLinks: List<DokkaConfiguration.ExternalDocumentationLink>, - override val noStdlibLink: Boolean, - override val cacheRoot: String?, - override val suppressedFiles: List<String>, - override val languageVersion: String?, - override val apiVersion: String? + 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<DokkaConfiguration.PassConfiguration> ) : DokkaConfiguration |