From 54c3c87acfb31afc22afc5f20229384f755b677f Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 2 May 2017 15:08:52 +0300 Subject: Refactoring internal communication for gradle --- integration/build.gradle | 1 + .../kotlin/org/jetbrains/dokka/DokkaBootstrap.kt | 17 +------- .../kotlin/org/jetbrains/dokka/configuration.kt | 47 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt (limited to 'integration') diff --git a/integration/build.gradle b/integration/build.gradle index 2f6514cb..55ac9dca 100644 --- a/integration/build.gradle +++ b/integration/build.gradle @@ -9,4 +9,5 @@ apply plugin: 'kotlin' dependencies { compile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: kotlin_for_gradle_version compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_version + compile 'com.github.yole:jkid:7d9c529c87' } \ No newline at end of file diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrap.kt b/integration/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrap.kt index 845f86a6..b78eb9c6 100644 --- a/integration/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrap.kt +++ b/integration/src/main/kotlin/org/jetbrains/dokka/DokkaBootstrap.kt @@ -4,22 +4,7 @@ import java.util.function.BiConsumer interface DokkaBootstrap { - fun configure(logger: BiConsumer, - moduleName: String, - classpath: List, - sources: List, - samples: List, - includes: List, - outputDir: String, - format: String, - includeNonPublic: Boolean, - includeRootPackage: Boolean, - reportUndocumented: Boolean, - skipEmptyPackages: Boolean, - skipDeprecated: Boolean, - jdkVersion: Int, - generateIndexPages: Boolean, - sourceLinks: List) + fun configure(logger: BiConsumer, serializedConfigurationJSON: String) fun generate() } \ No newline at end of file diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt new file mode 100644 index 00000000..90ba41ce --- /dev/null +++ b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt @@ -0,0 +1,47 @@ +package org.jetbrains.dokka + + +interface DokkaConfiguration { + val moduleName: String + val classpath: List + val sourceRoots: List + val samples: List + val includes: List + 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 + + interface SourceRoot { + val path: String + val defaultPlatforms: List + } + + interface SourceLinkDefinition { + val path: String + val url: String + val lineSuffix: String? + } +} + +data class SerializeOnlyDokkaConfiguration(override val moduleName: String, + override val classpath: List, + override val sourceRoots: List, + override val samples: List, + override val includes: List, + 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 -- cgit