diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-09-03 13:39:58 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-09-04 08:55:02 +0200 |
commit | cc3d4872f70cfebaf5d85c72af0030f526671915 (patch) | |
tree | b8f75efddd4cb631b930b0d24efdbdcc4159ee73 /core | |
parent | 4d8e84396824b8a3d5d6e3e26ea4911fa944e3aa (diff) | |
download | dokka-cc3d4872f70cfebaf5d85c72af0030f526671915.tar.gz dokka-cc3d4872f70cfebaf5d85c72af0030f526671915.tar.bz2 dokka-cc3d4872f70cfebaf5d85c72af0030f526671915.zip |
Javadoc version number is always 0.0.1 #1406
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/configuration.kt | 2 | ||||
-rw-r--r-- | core/src/main/kotlin/defaultConfiguration.kt | 1 | ||||
-rw-r--r-- | core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt index b53fd1ee..f5b2254a 100644 --- a/core/src/main/kotlin/configuration.kt +++ b/core/src/main/kotlin/configuration.kt @@ -28,6 +28,7 @@ object DokkaDefaults { const val sourceSetDisplayName = "JVM" const val sourceSetName = "main" + val moduleVersion: String? = null } enum class Platform(val key: String) { @@ -83,6 +84,7 @@ fun DokkaConfiguration.toJsonString(): String = toJsonString(this) interface DokkaConfiguration : Serializable { val moduleName: String + val moduleVersion: String? val outputDir: File val cacheRoot: File? val offlineMode: Boolean diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/core/src/main/kotlin/defaultConfiguration.kt index 69df44b1..45bf904d 100644 --- a/core/src/main/kotlin/defaultConfiguration.kt +++ b/core/src/main/kotlin/defaultConfiguration.kt @@ -6,6 +6,7 @@ import java.net.URL data class DokkaConfigurationImpl( override val moduleName: String = DokkaDefaults.moduleName, + override val moduleVersion: String? = DokkaDefaults.moduleVersion, override val outputDir: File = DokkaDefaults.outputDir, override val cacheRoot: File? = DokkaDefaults.cacheRoot, override val offlineMode: Boolean = DokkaDefaults.offlineMode, diff --git a/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt b/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt index d7b4f64f..7bbebe61 100644 --- a/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt +++ b/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt @@ -23,7 +23,7 @@ class TestDokkaConfigurationBuilder { check(lazySourceSets.isEmpty()) { "Cannot set moduleName after adding source sets" } field = value } - + var moduleVersion: String = "1.0-SNAPSHOT" var outputDir: String = "out" var format: String = "html" var offlineMode: Boolean = false @@ -32,8 +32,10 @@ class TestDokkaConfigurationBuilder { var pluginsConfigurations: Map<String, String> = emptyMap() var failOnWarning: Boolean = false private val lazySourceSets = mutableListOf<Lazy<DokkaSourceSetImpl>>() + fun build() = DokkaConfigurationImpl( moduleName = moduleName, + moduleVersion = moduleVersion, outputDir = File(outputDir), cacheRoot = cacheRoot?.let(::File), offlineMode = offlineMode, |