diff options
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org')
4 files changed, 22 insertions, 29 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaLeafTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaLeafTask.kt new file mode 100644 index 00000000..96f43c77 --- /dev/null +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaLeafTask.kt @@ -0,0 +1,20 @@ +package org.jetbrains.dokka.gradle; + +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.internal.plugins.DslObject +import org.gradle.api.tasks.Internal + +abstract class AbstractDokkaLeafTask() : AbstractDokkaTask() { + + @get:Internal + val dokkaSourceSets: NamedDomainObjectContainer<GradleDokkaSourceSetBuilder> = + project.container(GradleDokkaSourceSetBuilder::class.java, gradleDokkaSourceSetBuilderFactory()) + .also { container -> + DslObject(this).extensions.add("dokkaSourceSets", container) + project.kotlinOrNull?.sourceSets?.all { kotlinSourceSet -> + container.register(kotlinSourceSet.name) { dokkaSourceSet -> + dokkaSourceSet.configureWithKotlinSourceSet(kotlinSourceSet) + } + } + } +} 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 b431cf98..ad17a67d 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 @@ -4,9 +4,6 @@ import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Nested -import org.jetbrains.dokka.DokkaBootstrap -import org.jetbrains.dokka.DokkaBootstrapImpl -import kotlin.reflect.KClass abstract class AbstractDokkaParentTask : AbstractDokkaTask() { 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 eaf4f495..48584786 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,19 +6,7 @@ import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Nested import org.jetbrains.dokka.* -abstract class DokkaTask : AbstractDokkaTask() { - - @get:Internal - val dokkaSourceSets: NamedDomainObjectContainer<GradleDokkaSourceSetBuilder> = - project.container(GradleDokkaSourceSetBuilder::class.java, gradleDokkaSourceSetBuilderFactory()) - .also { container -> - DslObject(this).extensions.add("dokkaSourceSets", container) - project.kotlinOrNull?.sourceSets?.all { kotlinSourceSet -> - container.register(kotlinSourceSet.name) { dokkaSourceSet -> - dokkaSourceSet.configureWithKotlinSourceSet(kotlinSourceSet) - } - } - } +abstract class DokkaTask : AbstractDokkaLeafTask() { /** * Only contains source sets that are marked with `isDocumented`. diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt index 4513cfea..39c0bab2 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt @@ -7,19 +7,7 @@ import org.gradle.api.tasks.Nested import org.jetbrains.dokka.DokkaConfigurationImpl import org.jetbrains.dokka.build -abstract class DokkaTaskPartial : AbstractDokkaTask() { - - @get:Internal - val dokkaSourceSets: NamedDomainObjectContainer<GradleDokkaSourceSetBuilder> = - project.container(GradleDokkaSourceSetBuilder::class.java, gradleDokkaSourceSetBuilderFactory()) - .also { container -> - DslObject(this).extensions.add("dokkaSourceSets", container) - project.kotlinOrNull?.sourceSets?.all { kotlinSourceSet -> - container.register(kotlinSourceSet.name) { dokkaSourceSet -> - dokkaSourceSet.configureWithKotlinSourceSet(kotlinSourceSet) - } - } - } +abstract class DokkaTaskPartial : AbstractDokkaLeafTask() { /** * Only contains source sets that are marked with `isDocumented`. |