aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/build.gradle.kts
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-01-31 00:37:29 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-01-31 15:27:26 +0100
commite99be615ce7c2c2b5c3ee5e3f8941c41c1e7a944 (patch)
tree7e3eb4f67d36d3b7b6db6aec08c58de2e1b678d3 /runners/gradle-plugin/build.gradle.kts
parent0073c4c547dafaae5d465d4c410a52fd7fdc818d (diff)
downloaddokka-e99be615ce7c2c2b5c3ee5e3f8941c41c1e7a944.tar.gz
dokka-e99be615ce7c2c2b5c3ee5e3f8941c41c1e7a944.tar.bz2
dokka-e99be615ce7c2c2b5c3ee5e3f8941c41c1e7a944.zip
Bump Gradle version, migrate to Kotlin DSL, refactor publishing
Diffstat (limited to 'runners/gradle-plugin/build.gradle.kts')
-rw-r--r--runners/gradle-plugin/build.gradle.kts74
1 files changed, 74 insertions, 0 deletions
diff --git a/runners/gradle-plugin/build.gradle.kts b/runners/gradle-plugin/build.gradle.kts
new file mode 100644
index 00000000..0d68a525
--- /dev/null
+++ b/runners/gradle-plugin/build.gradle.kts
@@ -0,0 +1,74 @@
+import org.jetbrains.configureBintrayPublication
+
+plugins {
+ id("com.gradle.plugin-publish")
+}
+
+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())
+ 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")
+ }
+ }
+}
+
+tasks {
+ processResources {
+ val dokka_version: String by project
+ eachFile {
+ if (name == "org.jetbrains.dokka.properties") {
+ filter { line ->
+ line.replace("<version>", dokka_version)
+ }
+ }
+ }
+ }
+}
+
+val sourceJar by tasks.registering(Jar::class) {
+ archiveClassifier.set("sources")
+ from(sourceSets["main"].allSource)
+}
+
+publishing {
+ publications {
+ register<MavenPublication>("dokkaGradlePlugin") {
+ artifactId = "dokka-gradle-plugin"
+ from(components["java"])
+ artifact(sourceJar.get())
+ }
+ }
+}
+
+configureBintrayPublication("dokkaGradlePlugin") // TODO check if this publishes correctly
+
+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 {
+ create("dokkaGradlePlugin") {
+ id = "org.jetbrains.dokka"
+ displayName = "Dokka plugin"
+ }
+ }
+
+ mavenCoordinates {
+ groupId = "org.jetbrains.dokka"
+ artifactId = "dokka-gradle-plugin"
+ }
+} \ No newline at end of file