aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-09-03 13:39:58 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-09-04 08:55:02 +0200
commitcc3d4872f70cfebaf5d85c72af0030f526671915 (patch)
treeb8f75efddd4cb631b930b0d24efdbdcc4159ee73 /runners
parent4d8e84396824b8a3d5d6e3e26ea4911fa944e3aa (diff)
downloaddokka-cc3d4872f70cfebaf5d85c72af0030f526671915.tar.gz
dokka-cc3d4872f70cfebaf5d85c72af0030f526671915.tar.bz2
dokka-cc3d4872f70cfebaf5d85c72af0030f526671915.zip
Javadoc version number is always 0.0.1 #1406
Diffstat (limited to 'runners')
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt4
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt1
3 files changed, 11 insertions, 0 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt
index 9f7755f6..fbdbf5eb 100644
--- a/runners/cli/src/main/kotlin/cli/main.kt
+++ b/runners/cli/src/main/kotlin/cli/main.kt
@@ -23,6 +23,12 @@ class GlobalArguments(args: Array<String>) : DokkaConfiguration {
override val moduleName: String by _moduleName
+ override val moduleVersion by parser.option(
+ ArgType.String,
+ description = "Documentation version",
+ fullName = "moduleVersion"
+ )
+
override val outputDir by parser.option(ArgTypeFile, description = "Output directory path")
.default(DokkaDefaults.outputDir)
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
index b4800124..9dab1f04 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
@@ -28,6 +28,10 @@ abstract class AbstractDokkaTask(
val moduleName: Property<String> = project.objects.safeProperty<String>()
.safeConvention(project.name)
+ @Input
+ val moduleVersion: Property<String> = project.objects.safeProperty<String>()
+ .safeConvention(project.version.toString())
+
@OutputDirectory
val outputDirectory: Property<File> = project.objects.safeProperty<File>()
.safeConvention(defaultDokkaOutputDirectory())
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
index beec3a7e..ed3989af 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
@@ -37,6 +37,7 @@ abstract class DokkaTask : AbstractDokkaTask(DokkaBootstrapImpl::class) {
override fun buildDokkaConfiguration(): DokkaConfigurationImpl {
return DokkaConfigurationImpl(
moduleName = moduleName.getSafe(),
+ moduleVersion = moduleVersion.orNull,
outputDir = outputDirectory.getSafe(),
cacheRoot = cacheRoot.getSafe(),
offlineMode = offlineMode.getSafe(),