diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-09-22 17:29:21 +0200 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-27 03:15:02 +0100 |
commit | 80b6d1824960205e1c1d57c0c51e913d3c2360db (patch) | |
tree | ea40c9c6dc0bd24999312cfa49a01c43cb746926 /runners/gradle-plugin/src/main | |
parent | c8a83153a88fe6f5b50b6f459295421f90a21583 (diff) | |
download | dokka-80b6d1824960205e1c1d57c0c51e913d3c2360db.tar.gz dokka-80b6d1824960205e1c1d57c0c51e913d3c2360db.tar.bz2 dokka-80b6d1824960205e1c1d57c0c51e913d3c2360db.zip |
Add templating commands to the html format
Diffstat (limited to 'runners/gradle-plugin/src/main')
4 files changed, 12 insertions, 15 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTask.kt index c782197e..b431cf98 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTask.kt @@ -8,9 +8,7 @@ import org.jetbrains.dokka.DokkaBootstrap import org.jetbrains.dokka.DokkaBootstrapImpl import kotlin.reflect.KClass -abstract class AbstractDokkaParentTask( - bootstrapClass: KClass<out DokkaBootstrap> = DokkaBootstrapImpl::class -) : AbstractDokkaTask(bootstrapClass) { +abstract class AbstractDokkaParentTask : AbstractDokkaTask() { @get:Internal internal var childDokkaTaskPaths: Set<String> = emptySet() 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 77b4b2e1..d2506f7a 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 @@ -22,9 +22,7 @@ import java.util.function.BiConsumer import kotlin.reflect.KClass import kotlin.reflect.full.createInstance -abstract class AbstractDokkaTask( - private val bootstrapClass: KClass<out DokkaBootstrap> = DokkaBootstrap::class -) : DefaultTask() { +abstract class AbstractDokkaTask : DefaultTask() { @Input val moduleName: Property<String> = project.objects.safeProperty<String>() @@ -81,7 +79,7 @@ abstract class AbstractDokkaTask( @TaskAction internal open fun generateDocumentation() { - DokkaBootstrap(runtime, bootstrapClass).apply { + DokkaBootstrap(runtime, DokkaBootstrapImpl::class).apply { configure(buildDokkaConfiguration().toJsonString(), createProxyLogger()) generate() } diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt index 74f17215..4139a0cd 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt @@ -2,12 +2,12 @@ package org.jetbrains.dokka.gradle import org.gradle.api.internal.tasks.TaskDependencyInternal import org.gradle.api.provider.Property -import org.gradle.api.tasks.* -import org.jetbrains.dokka.DokkaBootstrapImpl +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.OutputDirectories import org.jetbrains.dokka.DokkaConfigurationImpl import org.jetbrains.dokka.DokkaModuleDescriptionImpl -import org.jetbrains.dokka.DokkaMultimoduleBootstrapImpl -import org.jetbrains.dokka.PluginConfigurationImpl import java.io.File @Suppress("unused") // Shall provide source compatibility if possible @@ -16,7 +16,7 @@ typealias DokkaMultimoduleTask = DokkaMultiModuleTask private typealias TaskPath = String -abstract class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaBootstrapImpl::class) { +abstract class DokkaMultiModuleTask : AbstractDokkaParentTask() { @Internal val fileLayout: Property<DokkaMultiModuleFileLayout> = project.objects.safeProperty<DokkaMultiModuleFileLayout>() @@ -43,7 +43,7 @@ abstract class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaBootstrapImpl override fun generateDocumentation() { checkChildDokkaTasksIsNotEmpty() - copyChildOutputDirectories() +// copyChildOutputDirectories() super.generateDocumentation() } @@ -59,7 +59,8 @@ abstract class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaBootstrapImpl DokkaModuleDescriptionImpl( name = dokkaTask.moduleName.getSafe(), relativePathToOutputDirectory = targetChildOutputDirectory(dokkaTask).relativeTo(outputDirectory.getSafe()), - includes = childDokkaTaskIncludes[dokkaTask.path].orEmpty() + includes = childDokkaTaskIncludes[dokkaTask.path].orEmpty(), + sourceOutputDirectory = dokkaTask.outputDirectory.getSafe() ) } ) 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 9944bacb..caee0d92 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 @@ -6,7 +6,7 @@ import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Nested import org.jetbrains.dokka.* -abstract class DokkaTask : AbstractDokkaTask(DokkaBootstrapImpl::class) { +abstract class DokkaTask : AbstractDokkaTask() { @get:Internal val dokkaSourceSets: NamedDomainObjectContainer<GradleDokkaSourceSetBuilder> = |