diff options
author | KrystianUjma <kujma@virtuslab.com> | 2019-06-05 13:53:55 +0200 |
---|---|---|
committer | KrystianUjma <kujma@virtuslab.com> | 2019-06-05 13:53:55 +0200 |
commit | 7a604e0fd57d29fab4d7f84c29611f5796f1ed1a (patch) | |
tree | 5d88fbf594e6f0ff10c4360b4e466751880ef4b7 /runners/gradle-plugin/src | |
parent | 8b5329a48aa84de32c76e39f62fd3edbd36051ec (diff) | |
download | dokka-7a604e0fd57d29fab4d7f84c29611f5796f1ed1a.tar.gz dokka-7a604e0fd57d29fab4d7f84c29611f5796f1ed1a.tar.bz2 dokka-7a604e0fd57d29fab4d7f84c29611f5796f1ed1a.zip |
#462 - add dokkaRuntime support for multiple dokka tasks
Diffstat (limited to 'runners/gradle-plugin/src')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 14 |
1 files changed, 7 insertions, 7 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 16e633fd..3e65e6d4 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 @@ -16,22 +16,22 @@ open class DokkaPlugin : Plugin<Project> { DokkaVersion.loadFrom(javaClass.getResourceAsStream("/META-INF/gradle-plugins/org.jetbrains.dokka.properties")) // TODO: Register instead of create for Gradle >= 4.10 - val dokkaRuntimeConfiguration = project.configurations.create("dokkaRuntime") - val defaultDokkaRuntimeConfiguration = project.configurations.create("defaultDokkaRuntime") - - defaultDokkaRuntimeConfiguration.defaultDependencies{ dependencies -> dependencies.add(project.dependencies.create("org.jetbrains.dokka:dokka-fatjar:${DokkaVersion.version}")) } - project.tasks.create("dokka", DokkaTask::class.java).apply { - dokkaRuntime = dokkaRuntimeConfiguration - defaultDokkaRuntime = defaultDokkaRuntimeConfiguration moduleName = project.name outputDirectory = File(project.buildDir, "dokka").absolutePath } + val dokkaRuntimeConfiguration = project.configurations.create("dokkaRuntime") + val defaultDokkaRuntimeConfiguration = project.configurations.create("defaultDokkaRuntime") + + defaultDokkaRuntimeConfiguration.defaultDependencies{ dependencies -> dependencies.add(project.dependencies.create("org.jetbrains.dokka:dokka-fatjar:${DokkaVersion.version}")) } + project.tasks.withType(DokkaTask::class.java) { task -> val passConfiguration = project.container(GradlePassConfigurationImpl::class.java) task.multiplatform = passConfiguration task.configuration = GradlePassConfigurationImpl() + task.dokkaRuntime = dokkaRuntimeConfiguration + task.defaultDokkaRuntime = defaultDokkaRuntimeConfiguration } } } |