From 64b5d214a61dd7964ddad46f3c91475336063d78 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Tue, 18 Feb 2020 13:20:15 +0100 Subject: Adds bintray publication for dokka base --- .idea/kotlinScripting.xml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .idea/kotlinScripting.xml (limited to '.idea/kotlinScripting.xml') diff --git a/.idea/kotlinScripting.xml b/.idea/kotlinScripting.xml new file mode 100644 index 00000000..a6fe551d --- /dev/null +++ b/.idea/kotlinScripting.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file -- cgit From 3e13d29c01b70ae94fe0dcb6aec33afd7c3aec98 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Thu, 9 Jul 2020 17:14:00 +0200 Subject: Rename DokkaDependencies.kt to DokkaArtifacts.kt --- .idea/kotlinScripting.xml | 2 +- .../gradle/projects/it-basic/build.gradle.kts | 7 +++++-- .../kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt | 17 +++++++++++++++++ .../org/jetbrains/dokka/gradle/DokkaDependencies.kt | 17 ----------------- .../main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 6 ++---- .../src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 6 +++--- 6 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt delete mode 100644 runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaDependencies.kt (limited to '.idea/kotlinScripting.xml') diff --git a/.idea/kotlinScripting.xml b/.idea/kotlinScripting.xml index a6fe551d..bc444dea 100644 --- a/.idea/kotlinScripting.xml +++ b/.idea/kotlinScripting.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/integration-tests/gradle/projects/it-basic/build.gradle.kts index 58f97b6c..fe21e6d6 100644 --- a/integration-tests/gradle/projects/it-basic/build.gradle.kts +++ b/integration-tests/gradle/projects/it-basic/build.gradle.kts @@ -7,10 +7,13 @@ plugins { apply(from = "../template.root.gradle.kts") -val customDokkaTask by tasks.register("customDokka") - dependencies { + dokkaPlugin("my:plugin:version") + dokkaJavadocPlugin("my:plugin-extending-javadoc:version") implementation(kotlin("stdlib")) } +tasks.dokkaGfm { + outputDirectory = File(buildDir, "gfm").absolutePath +} diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt new file mode 100644 index 00000000..90d51015 --- /dev/null +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt @@ -0,0 +1,17 @@ +package org.jetbrains.dokka.gradle + +import org.gradle.api.Project +import org.jetbrains.dokka.DokkaVersion + +internal val Project.dokkaArtifacts get() = DokkaArtifacts(this) + +internal class DokkaArtifacts(private val project: Project) { + private fun fromModuleName(name: String) = + project.dependencies.create("org.jetbrains.dokka:$name:${DokkaVersion.version}") + + val dokkaCore get() = fromModuleName("dokka-core") + val dokkaBase get() = fromModuleName("dokka-base") + val javadocPlugin get() = fromModuleName("javadoc-plugin") + val gfmPlugin get() = fromModuleName("gfm-plugin") + val jekyllPlugin get() = fromModuleName("jekyll-plugin") +} diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaDependencies.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaDependencies.kt deleted file mode 100644 index 2ee1d479..00000000 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaDependencies.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.jetbrains.dokka.gradle - -import org.gradle.api.Project -import org.jetbrains.dokka.DokkaVersion - -internal val Project.dokkaDependencies get() = DokkaDependencies(this) - -internal class DokkaDependencies(private val project: Project) { - private fun fromModuleName(name: String) = - project.dependencies.create("org.jetbrains.dokka:$name:${DokkaVersion.version}") - - val dokkaCore get() = fromModuleName("dokka-core") - val dokkaBase get() = fromModuleName("dokka-base") - val javadocPlugin get() = fromModuleName("javadoc-plugin") - val gfmPlugin get() = fromModuleName("gfm-plugin") - val jekyllPlugin get() = fromModuleName("jekyll-plugin") -} 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 2bdfa0bd..0eddd8e6 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 @@ -16,9 +16,7 @@ import org.jetbrains.dokka.ReflectDsl.isNotInstance import org.jetbrains.dokka.gradle.ConfigurationExtractor.PlatformData import org.jetbrains.dokka.plugability.Configurable import java.io.File -import java.net.URLClassLoader import java.util.concurrent.Callable -import java.util.function.BiConsumer open class DokkaTask : DefaultTask(), Configurable { private val ANDROID_REFERENCE_URL = Builder("https://developer.android.com/reference/").build() @@ -61,14 +59,14 @@ open class DokkaTask : DefaultTask(), Configurable { @Classpath val runtime = project.configurations.create("${name}Runtime").apply { defaultDependencies { dependencies -> - dependencies.add(project.dokkaDependencies.dokkaCore) + dependencies.add(project.dokkaArtifacts.dokkaCore) } } @Classpath val plugins: Configuration = project.configurations.create("${name}Plugin").apply { defaultDependencies { dependencies -> - dependencies.add(project.dokkaDependencies.dokkaBase) + dependencies.add(project.dokkaArtifacts.dokkaBase) } attributes.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage::class.java, "java-runtime")) isCanBeConsumed = false 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 b32a3967..3e2c51f4 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 @@ -10,15 +10,15 @@ open class DokkaPlugin : Plugin { project.createDokkaTasks("dokka") project.createDokkaTasks("dokkaJavadoc") { - plugins.dependencies.add(project.dokkaDependencies.javadocPlugin) + plugins.dependencies.add(project.dokkaArtifacts.javadocPlugin) } project.createDokkaTasks("dokkaGfm") { - plugins.dependencies.add(project.dokkaDependencies.gfmPlugin) + plugins.dependencies.add(project.dokkaArtifacts.gfmPlugin) } project.createDokkaTasks("dokkaJekyll") { - plugins.dependencies.add(project.dokkaDependencies.jekyllPlugin) + plugins.dependencies.add(project.dokkaArtifacts.jekyllPlugin) } } -- cgit