diff options
author | KrystianUjma <kujma@virtuslab.com> | 2019-06-14 18:08:02 +0200 |
---|---|---|
committer | KrystianUjma <kujma@virtuslab.com> | 2019-06-14 18:08:02 +0200 |
commit | 06bf55243ec4248d8cc4a72be033edcfa51ccd41 (patch) | |
tree | f5b98a27f2656b16a90082f80a8bb0817c588d5c /runners/gradle-plugin/src | |
parent | 2460de3be8010a2e16c5ee91bb5d2a28cb54796f (diff) | |
download | dokka-06bf55243ec4248d8cc4a72be033edcfa51ccd41.tar.gz dokka-06bf55243ec4248d8cc4a72be033edcfa51ccd41.tar.bz2 dokka-06bf55243ec4248d8cc4a72be033edcfa51ccd41.zip |
refactoring
Diffstat (limited to 'runners/gradle-plugin/src')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt index 209e812b..a87b803c 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt @@ -17,18 +17,19 @@ open class DokkaPlugin : Plugin<Project> { val dokkaRuntimeConfiguration = project.configurations.create("dokkaRuntime") val defaultDokkaRuntimeConfiguration = project.configurations.create("defaultDokkaRuntime") + val taskName = "dokka" defaultDokkaRuntimeConfiguration.defaultDependencies{ dependencies -> dependencies.add(project.dependencies.create("org.jetbrains.dokka:dokka-fatjar:${DokkaVersion.version}")) } if(GradleVersion.current() >= GradleVersion.version("4.10")) { - project.tasks.register("dokka", DokkaTask::class.java).configure { + project.tasks.register(taskName, DokkaTask::class.java).configure { it.moduleName = project.name - it.outputDirectory = File(project.buildDir, "dokka").absolutePath + it.outputDirectory = File(project.buildDir, taskName).absolutePath } } else { - project.tasks.create("dokka", DokkaTask::class.java).apply { + project.tasks.create(taskName, DokkaTask::class.java).apply { moduleName = project.name - outputDirectory = File(project.buildDir, "dokka").absolutePath + outputDirectory = File(project.buildDir, taskName).absolutePath } } |