aboutsummaryrefslogtreecommitdiff
path: root/integration/src/main
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-04-08 17:22:04 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-04-08 17:22:04 +0200
commit49800d9c8276ec8851bcc3b181563cd6e0f8f4b9 (patch)
tree16462fc1425e5d53cbc53fcd4d0bacd3435fde5c /integration/src/main
parent9975b7209f55edfe7e2f1a48e8d1f8b3c522e71a (diff)
downloaddokka-49800d9c8276ec8851bcc3b181563cd6e0f8f4b9.tar.gz
dokka-49800d9c8276ec8851bcc3b181563cd6e0f8f4b9.tar.bz2
dokka-49800d9c8276ec8851bcc3b181563cd6e0f8f4b9.zip
Implement Gradle Pass Configuration
Diffstat (limited to 'integration/src/main')
-rw-r--r--integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt23
-rw-r--r--integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt12
2 files changed, 5 insertions, 30 deletions
diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt
index 717fa477..49481089 100644
--- a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt
+++ b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt
@@ -1,26 +1,7 @@
package org.jetbrains.dokka
-import kotlinx.serialization.*
-import kotlinx.serialization.internal.StringDescriptor
import java.net.URL
-
-@Serializer(forClass = URL::class)
-object UrlSerializer: KSerializer<URL> {
-
- override val descriptor: SerialDescriptor =
- StringDescriptor.withName("WithCustomDefault")
-
- override fun deserialize(decoder: Decoder): URL {
- return URL(decoder.decodeString())
- }
-
- override fun serialize(encoder: Encoder, obj: URL) {
- encoder.encodeString(obj.toExternalForm())
- }
-}
-
-
enum class Platform(val key: String) {
jvm("jvm"),
js("js"),
@@ -97,8 +78,8 @@ interface DokkaConfiguration {
}
interface ExternalDocumentationLink {
- @Serializable(with = UrlSerializer::class) val url: URL
- @Serializable(with = UrlSerializer::class) val packageListUrl: URL
+ val url: URL
+ val packageListUrl: URL
open class Builder(open var url: URL? = null,
open var packageListUrl: URL? = null) {
diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt
index 615f0215..6d754ebc 100644
--- a/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt
+++ b/integration/src/main/kotlin/org/jetbrains/dokka/defaultConfiguration.kt
@@ -1,10 +1,8 @@
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,
@@ -14,7 +12,6 @@ data class DokkaConfigurationImpl(
override val passesConfigurations: List<PassConfigurationImpl>
) : DokkaConfiguration
-@Serializable
data class PassConfigurationImpl (
override val moduleName: String,
override val classpath: List<String>,
@@ -41,12 +38,11 @@ data class PassConfigurationImpl (
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,
@@ -63,7 +59,6 @@ data class SourceLinkDefinitionImpl(
}
}
-@Serializable
data class PackageOptionsImpl(
override val prefix: String,
override val includeNonPublic: Boolean,
@@ -73,7 +68,6 @@ data class PackageOptionsImpl(
): DokkaConfiguration.PackageOptions
-@Serializable
-data class ExternalDocumentationLinkImpl(@Serializable(with = UrlSerializer::class) override val url: URL,
- @Serializable(with = UrlSerializer::class) override val packageListUrl: URL
+data class ExternalDocumentationLinkImpl(override val url: URL,
+ override val packageListUrl: URL
) : DokkaConfiguration.ExternalDocumentationLink \ No newline at end of file