diff options
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-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 } } } |