import org.jetbrains.configureBintrayPublication plugins { id("com.gradle.plugin-publish") `java-gradle-plugin` } repositories { google() } dependencies { implementation(project(":core")) compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin") compileOnly("com.android.tools.build:gradle:3.0.0") compileOnly("com.android.tools.build:gradle-core:3.0.0") compileOnly("com.android.tools.build:builder-model:3.0.0") compileOnly(gradleApi()) compileOnly(gradleKotlinDsl()) testImplementation(gradleApi()) testImplementation(kotlin("test-junit")) constraints { val kotlin_version: String by project compileOnly("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}") { because("kotlin-gradle-plugin and :core both depend on this") } } } val sourceJar by tasks.registering(Jar::class) { archiveClassifier.set("sources") from(sourceSets["main"].allSource) } configureBintrayPublication("dokkaGradlePlugin") // TODO check if this publishes correctly val gradlePluginImplementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin" val gradlePluginId = "org.jetbrains.dokka" publishing { publications { register("dokkaGradlePlugin") { artifactId = "dokka-gradle-plugin" from(components["java"]) artifact(sourceJar.get()) } register("dokkaGradlePluginForIntegrationTests") { artifactId = "dokka-gradle-plugin" from(components["java"]) artifact(sourceJar.get()) version = "for-integration-tests-SNAPSHOT" } } } gradlePlugin { plugins { create("dokkaGradlePlugin") { id = "org.jetbrains.dokka" implementationClass = gradlePluginImplementationClass } } } pluginBundle { // TODO check if this publishes correctly website = "https://www.kotlinlang.org/" vcsUrl = "https://github.com/kotlin/dokka.git" description = "Dokka, the Kotlin documentation tool" tags = listOf("dokka", "kotlin", "kdoc", "android") plugins { getByName("dokkaGradlePlugin") { displayName = "Dokka plugin" } } mavenCoordinates { groupId = "org.jetbrains.dokka" artifactId = "dokka-gradle-plugin" } }