From 08f40e2a13006882e8f8425f111b8527e7bbcb0f Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" <sebastian.sellmair@jetbrains.com> Date: Wed, 24 Jun 2020 09:14:37 +0200 Subject: Remove kotlin source analysis from :core to :kotlin-analysis (thanks to Afzal Najam) --- kotlin-analysis/build.gradle.kts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 kotlin-analysis/build.gradle.kts (limited to 'kotlin-analysis/build.gradle.kts') diff --git a/kotlin-analysis/build.gradle.kts b/kotlin-analysis/build.gradle.kts new file mode 100644 index 00000000..67480f82 --- /dev/null +++ b/kotlin-analysis/build.gradle.kts @@ -0,0 +1,27 @@ +import org.jetbrains.configureBintrayPublication + +plugins { + id("com.github.johnrengelman.shadow") + `maven-publish` + id("com.jfrog.bintray") +} + +dependencies { + compileOnly(project(":core")) + + val kotlin_version: String by project + api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version") + + api(project(":kotlin-analysis:dependencies", configuration = "shadow")) +} + +publishing { + publications { + register<MavenPublication>("analysis") { + artifactId = "dokka-analysis" + from(components["java"]) + } + } +} + +configureBintrayPublication("analysis") -- cgit From 7001425367a4db79c6fcdf6b8d0c53508ba50aa7 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas <aurimas@google.com> Date: Mon, 13 Jul 2020 18:33:28 -0700 Subject: Simplify publishing configuration and enable sourcejars --- .../org/jetbrains/PublicationConfiguration.kt | 34 ++++++++++++++++++++++ core/build.gradle.kts | 19 ++---------- core/dependencies/build.gradle.kts | 13 ++------- kotlin-analysis/build.gradle.kts | 13 ++------- kotlin-analysis/dependencies/build.gradle.kts | 15 ++-------- plugins/base/build.gradle.kts | 13 ++------- plugins/gfm/build.gradle.kts | 15 ++-------- plugins/javadoc/build.gradle.kts | 13 ++------- plugins/jekyll/build.gradle.kts | 15 ++-------- plugins/kotlin-as-java/build.gradle.kts | 13 ++------- plugins/mathjax/build.gradle.kts | 13 ++------- plugins/xml/build.gradle.kts | 11 ++----- runners/cli/build.gradle.kts | 13 ++------- runners/maven-plugin/build.gradle.kts | 15 ++-------- testApi/build.gradle.kts | 19 ++---------- 15 files changed, 65 insertions(+), 169 deletions(-) create mode 100644 buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt (limited to 'kotlin-analysis/build.gradle.kts') diff --git a/buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt b/buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt new file mode 100644 index 00000000..5dbb8fb9 --- /dev/null +++ b/buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt @@ -0,0 +1,34 @@ +package org.jetbrains + +import com.github.jengelman.gradle.plugins.shadow.ShadowExtension +import org.gradle.api.Project +import org.gradle.api.plugins.JavaPlugin +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.api.publish.PublishingExtension +import org.gradle.api.publish.maven.MavenPublication +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.create +import org.gradle.kotlin.dsl.get + +fun Project.configurePublication(artifactId: String, useShadow: Boolean = false) { + configure<PublishingExtension> { + publications { + create<MavenPublication>("maven") { + this.artifactId = artifactId + if (useShadow) { + val shadow = extensions.getByType(ShadowExtension::class.java) + shadow.component(this) + } else { + from(components["java"]) + } + } + } + } + configureBintrayPublication("maven") + plugins.all { + if (this is JavaPlugin) { + val extension = extensions.getByType(JavaPluginExtension::class.java) + @Suppress("UnstableApiUsage") extension.withSourcesJar() + } + } +} diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 45ddccf3..030db5c6 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication plugins { `maven-publish` @@ -16,11 +16,6 @@ dependencies { testImplementation(kotlin("test-junit")) } -val sourceJar by tasks.registering(Jar::class) { - archiveClassifier.set("sources") - from(sourceSets["main"].allSource) -} - tasks { processResources { val dokka_version: String by project @@ -34,14 +29,4 @@ tasks { } } -publishing { - publications { - register<MavenPublication>("dokkaCore") { - artifactId = "dokka-core" - from(components["java"]) - artifact(sourceJar.get()) - } - } -} - -configureBintrayPublication("dokkaCore") +configurePublication("dokka-core") diff --git a/core/dependencies/build.gradle.kts b/core/dependencies/build.gradle.kts index a26d109e..082861b6 100644 --- a/core/dependencies/build.gradle.kts +++ b/core/dependencies/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication plugins { id("com.github.johnrengelman.shadow") @@ -28,13 +28,4 @@ tasks { } } -publishing { - publications { - register<MavenPublication>("dokkaCoreDependencies") { - artifactId = "dokka-core-dependencies" - project.shadow.component(this) - } - } -} - -configureBintrayPublication("dokkaCoreDependencies") +configurePublication("dokka-core-dependencies", useShadow = true) diff --git a/kotlin-analysis/build.gradle.kts b/kotlin-analysis/build.gradle.kts index 67480f82..5acc1f06 100644 --- a/kotlin-analysis/build.gradle.kts +++ b/kotlin-analysis/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication plugins { id("com.github.johnrengelman.shadow") @@ -15,13 +15,4 @@ dependencies { api(project(":kotlin-analysis:dependencies", configuration = "shadow")) } -publishing { - publications { - register<MavenPublication>("analysis") { - artifactId = "dokka-analysis" - from(components["java"]) - } - } -} - -configureBintrayPublication("analysis") +configurePublication("dokka-analysis") diff --git a/kotlin-analysis/dependencies/build.gradle.kts b/kotlin-analysis/dependencies/build.gradle.kts index 5bba6422..1fd13630 100644 --- a/kotlin-analysis/dependencies/build.gradle.kts +++ b/kotlin-analysis/dependencies/build.gradle.kts @@ -1,5 +1,4 @@ -import org.jetbrains.configureBintrayPublication - +import org.jetbrains.configurePublication plugins { id("com.github.johnrengelman.shadow") @@ -54,14 +53,4 @@ tasks { } } - -publishing { - publications { - register<MavenPublication>("kotlin-analysis-dependencies") { - artifactId = "kotlin-analysis-dependencies" - project.shadow.component(this) - } - } -} - -configureBintrayPublication("kotlin-analysis-dependencies") +configurePublication("kotlin-analysis-dependencies", useShadow = true) diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts index 1fe3dbc2..61e2ef01 100644 --- a/plugins/base/build.gradle.kts +++ b/plugins/base/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication plugins { id("com.jfrog.bintray") @@ -30,13 +30,4 @@ tasks { } } -publishing { - publications { - register<MavenPublication>("basePlugin") { - artifactId = "dokka-base" - from(components["java"]) - } - } -} - -configureBintrayPublication("basePlugin") +configurePublication("dokka-base") diff --git a/plugins/gfm/build.gradle.kts b/plugins/gfm/build.gradle.kts index fac2c1c0..73958046 100644 --- a/plugins/gfm/build.gradle.kts +++ b/plugins/gfm/build.gradle.kts @@ -1,18 +1,9 @@ -import org.jetbrains.configureBintrayPublication - -publishing { - publications { - register<MavenPublication>("gfmPlugin") { - artifactId = "gfm-plugin" - from(components["java"]) - } - } -} - -configureBintrayPublication("gfmPlugin") +import org.jetbrains.configurePublication dependencies { implementation(project(":plugins:base")) testImplementation(project(":plugins:base")) testImplementation(project(":plugins:base:test-utils")) } + +configurePublication("gfm-plugin") diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts index ebf79f8f..5846ee62 100644 --- a/plugins/javadoc/build.gradle.kts +++ b/plugins/javadoc/build.gradle.kts @@ -1,13 +1,4 @@ -import org.jetbrains.configureBintrayPublication - -publishing { - publications { - register<MavenPublication>("javadocPlugin") { - artifactId = "javadoc-plugin" - from(components["java"]) - } - } -} +import org.jetbrains.configurePublication dependencies { implementation("com.soywiz.korlibs.korte:korte-jvm:1.10.3") @@ -19,4 +10,4 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") } -configureBintrayPublication("javadocPlugin") +configurePublication("javadoc-plugin") diff --git a/plugins/jekyll/build.gradle.kts b/plugins/jekyll/build.gradle.kts index 90002466..0d1e38d6 100644 --- a/plugins/jekyll/build.gradle.kts +++ b/plugins/jekyll/build.gradle.kts @@ -1,17 +1,8 @@ -import org.jetbrains.configureBintrayPublication - -publishing { - publications { - register<MavenPublication>("jekyllPlugin") { - artifactId = "jekyll-plugin" - from(components["java"]) - } - } -} - -configureBintrayPublication("jekyllPlugin") +import org.jetbrains.configurePublication dependencies { implementation(project(":plugins:base")) implementation(project(":plugins:gfm")) } + +configurePublication("jekyll-plugin") diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts index bd08ab92..27e90f84 100644 --- a/plugins/kotlin-as-java/build.gradle.kts +++ b/plugins/kotlin-as-java/build.gradle.kts @@ -1,13 +1,4 @@ -import org.jetbrains.configureBintrayPublication - -publishing { - publications { - register<MavenPublication>("kotlinAsJavaPlugin") { - artifactId = "kotlin-as-java-plugin" - from(components["java"]) - } - } -} +import org.jetbrains.configurePublication dependencies { implementation(project(":plugins:base")) @@ -16,4 +7,4 @@ dependencies { testImplementation(project(":test-tools")) } -configureBintrayPublication("kotlinAsJavaPlugin") \ No newline at end of file +configurePublication("kotlin-as-java-plugin") diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts index 67f4822f..ea4cdff0 100644 --- a/plugins/mathjax/build.gradle.kts +++ b/plugins/mathjax/build.gradle.kts @@ -1,12 +1,3 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication -publishing { - publications { - register<MavenPublication>("mathjaxPlugin") { - artifactId = "mathjax-plugin" - from(components["java"]) - } - } -} - -configureBintrayPublication("mathjaxPlugin") +configurePublication("mathjax-plugin") diff --git a/plugins/xml/build.gradle.kts b/plugins/xml/build.gradle.kts index cd65cfe4..5d3984bc 100644 --- a/plugins/xml/build.gradle.kts +++ b/plugins/xml/build.gradle.kts @@ -1,8 +1,3 @@ -publishing { - publications { - register<MavenPublication>("xmlPlugin") { - artifactId = "xml-plugin" - from(components["java"]) - } - } -} \ No newline at end of file +import org.jetbrains.configurePublication + +configurePublication("xml-plugin") \ No newline at end of file diff --git a/runners/cli/build.gradle.kts b/runners/cli/build.gradle.kts index 00e459b2..19a49346 100644 --- a/runners/cli/build.gradle.kts +++ b/runners/cli/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication plugins { id("com.github.johnrengelman.shadow") @@ -15,7 +15,6 @@ dependencies { implementation(kotlin("stdlib")) } - tasks { shadowJar { val dokka_version: String by project @@ -27,13 +26,5 @@ tasks { } } -publishing { - publications { - register<MavenPublication>("dokkaCli") { - artifactId = "dokka-cli" - project.shadow.component(this) - } - } -} +configurePublication("dokka-cli", useShadow = true) -configureBintrayPublication("dokkaCli") diff --git a/runners/maven-plugin/build.gradle.kts b/runners/maven-plugin/build.gradle.kts index 6214da6d..83d9f5af 100644 --- a/runners/maven-plugin/build.gradle.kts +++ b/runners/maven-plugin/build.gradle.kts @@ -1,7 +1,6 @@ -import org.jetbrains.configureBintrayPublication import org.jetbrains.CrossPlatformExec import org.jetbrains.SetupMaven - +import org.jetbrains.configurePublication val setupMaven by tasks.register<SetupMaven>("setupMaven") @@ -91,14 +90,4 @@ tasks.named<Jar>("jar") { } } -publishing { - publications { - register<MavenPublication>("dokkaMavenPlugin") { - artifactId = "dokka-maven-plugin" - from(components["java"]) - artifact(sourceJar.get()) - } - } -} - -configureBintrayPublication("dokkaMavenPlugin") +configurePublication("dokka-maven-plugin") diff --git a/testApi/build.gradle.kts b/testApi/build.gradle.kts index c8b510a1..1576dd99 100644 --- a/testApi/build.gradle.kts +++ b/testApi/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configureBintrayPublication +import org.jetbrains.configurePublication plugins { `maven-publish` @@ -13,19 +13,4 @@ dependencies { implementation(kotlin("reflect")) } -val sourceJar by tasks.registering(Jar::class) { - archiveClassifier.set("sources") - from(sourceSets["main"].allSource) -} - -publishing { - publications { - register<MavenPublication>("dokkaTestAPI") { - artifactId = "dokka-test-api" - from(components["java"]) - artifact(sourceJar.get()) - } - } -} - -configureBintrayPublication("dokkaTestAPI") \ No newline at end of file +configurePublication("dokka-test-api") -- cgit From 7ff409fdf621932590dbf0118fff2c73dc76b951 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" <sebastian.sellmair@jetbrains.com> Date: Tue, 14 Jul 2020 10:06:04 +0200 Subject: Adapt changes from "Simplify publishing configuration and enable sourcejars" --- build.gradle.kts | 2 + .../main/kotlin/org/jetbrains/BintrayPublishing.kt | 29 ----------- .../org/jetbrains/PublicationConfiguration.kt | 34 ------------- .../src/main/kotlin/org/jetbrains/publication.kt | 58 ++++++++++++++++++++++ core/build.gradle.kts | 6 ++- core/dependencies/build.gradle.kts | 8 ++- kotlin-analysis/build.gradle.kts | 6 ++- kotlin-analysis/dependencies/build.gradle.kts | 8 ++- plugins/base/build.gradle.kts | 6 ++- plugins/gfm/build.gradle.kts | 6 ++- plugins/javadoc/build.gradle.kts | 6 ++- plugins/jekyll/build.gradle.kts | 6 ++- plugins/kotlin-as-java/build.gradle.kts | 6 ++- plugins/mathjax/build.gradle.kts | 6 ++- runners/cli/build.gradle.kts | 8 ++- runners/gradle-plugin/build.gradle.kts | 4 +- runners/maven-plugin/build.gradle.kts | 11 ++-- testApi/build.gradle.kts | 6 ++- 18 files changed, 123 insertions(+), 93 deletions(-) delete mode 100644 buildSrc/src/main/kotlin/org/jetbrains/BintrayPublishing.kt delete mode 100644 buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt create mode 100644 buildSrc/src/main/kotlin/org/jetbrains/publication.kt (limited to 'kotlin-analysis/build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index 7cc0394f..c6335a31 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,6 +42,8 @@ subprojects { // Gradle metadata java { + @Suppress("UnstableApiUsage") + withSourcesJar() targetCompatibility = JavaVersion.VERSION_1_8 } } diff --git a/buildSrc/src/main/kotlin/org/jetbrains/BintrayPublishing.kt b/buildSrc/src/main/kotlin/org/jetbrains/BintrayPublishing.kt deleted file mode 100644 index 4180c445..00000000 --- a/buildSrc/src/main/kotlin/org/jetbrains/BintrayPublishing.kt +++ /dev/null @@ -1,29 +0,0 @@ -package org.jetbrains - -import com.jfrog.bintray.gradle.BintrayExtension -import org.gradle.api.Project -import org.gradle.kotlin.dsl.provideDelegate - -fun Project.configureBintrayPublication(vararg publications: String) { - val dokka_version: String by this - val dokka_publication_channel: String by this - extensions.configure<BintrayExtension>("bintray") { - user = System.getenv("BINTRAY_USER") - key = System.getenv("BINTRAY_KEY") - dryRun = System.getenv("BINTRAY_DRY_RUN") == "true" || - project.properties["bintray_dry_run"] == "true" - pkg = PackageConfig().apply { - repo = dokka_publication_channel - name = "dokka" - userOrg = "kotlin" - desc = "Dokka, the Kotlin documentation tool" - vcsUrl = "https://github.com/kotlin/dokka.git" - setLicenses("Apache-2.0") - version = VersionConfig().apply { - name = dokka_version - } - } - setPublications(*publications) - } -} - diff --git a/buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt b/buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt deleted file mode 100644 index 5dbb8fb9..00000000 --- a/buildSrc/src/main/kotlin/org/jetbrains/PublicationConfiguration.kt +++ /dev/null @@ -1,34 +0,0 @@ -package org.jetbrains - -import com.github.jengelman.gradle.plugins.shadow.ShadowExtension -import org.gradle.api.Project -import org.gradle.api.plugins.JavaPlugin -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.api.publish.PublishingExtension -import org.gradle.api.publish.maven.MavenPublication -import org.gradle.kotlin.dsl.configure -import org.gradle.kotlin.dsl.create -import org.gradle.kotlin.dsl.get - -fun Project.configurePublication(artifactId: String, useShadow: Boolean = false) { - configure<PublishingExtension> { - publications { - create<MavenPublication>("maven") { - this.artifactId = artifactId - if (useShadow) { - val shadow = extensions.getByType(ShadowExtension::class.java) - shadow.component(this) - } else { - from(components["java"]) - } - } - } - } - configureBintrayPublication("maven") - plugins.all { - if (this is JavaPlugin) { - val extension = extensions.getByType(JavaPluginExtension::class.java) - @Suppress("UnstableApiUsage") extension.withSourcesJar() - } - } -} diff --git a/buildSrc/src/main/kotlin/org/jetbrains/publication.kt b/buildSrc/src/main/kotlin/org/jetbrains/publication.kt new file mode 100644 index 00000000..47fb23f2 --- /dev/null +++ b/buildSrc/src/main/kotlin/org/jetbrains/publication.kt @@ -0,0 +1,58 @@ +package org.jetbrains + +import com.github.jengelman.gradle.plugins.shadow.ShadowExtension +import com.jfrog.bintray.gradle.BintrayExtension +import org.gradle.api.Project +import org.gradle.api.publish.PublishingExtension +import org.gradle.api.publish.maven.MavenPublication +import org.gradle.kotlin.dsl.* + +class DokkaPublicationBuilder { + enum class Component { + Java, Shadow + } + var artifactId: String? = null + var component: Component = Component.Java +} + +fun Project.registerDokkaArtifactPublication(publicationName: String, configure: DokkaPublicationBuilder.() -> Unit) { + configure<PublishingExtension> { + publications { + register<MavenPublication>(publicationName) { + val builder = DokkaPublicationBuilder().apply(configure) + this.artifactId = builder.artifactId + when (builder.component) { + DokkaPublicationBuilder.Component.Java -> from(components["java"]) + DokkaPublicationBuilder.Component.Shadow -> + extensions.getByType(ShadowExtension::class.java).component(this) + } + } + } + } + + configureBintrayPublication(publicationName) +} + +fun Project.configureBintrayPublication(vararg publications: String) { + val dokka_version: String by this + val dokka_publication_channel: String by this + extensions.configure<BintrayExtension>("bintray") { + user = System.getenv("BINTRAY_USER") + key = System.getenv("BINTRAY_KEY") + dryRun = System.getenv("BINTRAY_DRY_RUN") == "true" || + project.properties["bintray_dry_run"] == "true" + pkg = PackageConfig().apply { + repo = dokka_publication_channel + name = "dokka" + userOrg = "kotlin" + desc = "Dokka, the Kotlin documentation tool" + vcsUrl = "https://github.com/kotlin/dokka.git" + setLicenses("Apache-2.0") + version = VersionConfig().apply { + name = dokka_version + } + } + setPublications(*publications) + } +} + diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 030db5c6..b52d3729 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication plugins { `maven-publish` @@ -29,4 +29,6 @@ tasks { } } -configurePublication("dokka-core") +registerDokkaArtifactPublication("dokkaCore") { + artifactId = "dokka-core" +} diff --git a/core/dependencies/build.gradle.kts b/core/dependencies/build.gradle.kts index 082861b6..a074958d 100644 --- a/core/dependencies/build.gradle.kts +++ b/core/dependencies/build.gradle.kts @@ -1,4 +1,5 @@ -import org.jetbrains.configurePublication +import org.jetbrains.DokkaPublicationBuilder.Component.Shadow +import org.jetbrains.registerDokkaArtifactPublication plugins { id("com.github.johnrengelman.shadow") @@ -28,4 +29,7 @@ tasks { } } -configurePublication("dokka-core-dependencies", useShadow = true) +registerDokkaArtifactPublication("dokkaCoreDependencies") { + artifactId = "dokka-core-dependencies" + component = Shadow +} diff --git a/kotlin-analysis/build.gradle.kts b/kotlin-analysis/build.gradle.kts index 5acc1f06..f87811e1 100644 --- a/kotlin-analysis/build.gradle.kts +++ b/kotlin-analysis/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication plugins { id("com.github.johnrengelman.shadow") @@ -15,4 +15,6 @@ dependencies { api(project(":kotlin-analysis:dependencies", configuration = "shadow")) } -configurePublication("dokka-analysis") +registerDokkaArtifactPublication("dokkaAnalysis") { + artifactId = "dokka-analysis" +} diff --git a/kotlin-analysis/dependencies/build.gradle.kts b/kotlin-analysis/dependencies/build.gradle.kts index 1fd13630..4aba6614 100644 --- a/kotlin-analysis/dependencies/build.gradle.kts +++ b/kotlin-analysis/dependencies/build.gradle.kts @@ -1,4 +1,5 @@ -import org.jetbrains.configurePublication +import org.jetbrains.DokkaPublicationBuilder.Component.Shadow +import org.jetbrains.registerDokkaArtifactPublication plugins { id("com.github.johnrengelman.shadow") @@ -53,4 +54,7 @@ tasks { } } -configurePublication("kotlin-analysis-dependencies", useShadow = true) +registerDokkaArtifactPublication("kotlinAnalysisDependencies"){ + artifactId = "kotlin-analysis-dependencies" + component = Shadow +} diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts index 61e2ef01..0fc7f55c 100644 --- a/plugins/base/build.gradle.kts +++ b/plugins/base/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication plugins { id("com.jfrog.bintray") @@ -30,4 +30,6 @@ tasks { } } -configurePublication("dokka-base") +registerDokkaArtifactPublication("dokkaBase") { + artifactId = "dokka-base" +} diff --git a/plugins/gfm/build.gradle.kts b/plugins/gfm/build.gradle.kts index 73958046..3f69043d 100644 --- a/plugins/gfm/build.gradle.kts +++ b/plugins/gfm/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication dependencies { implementation(project(":plugins:base")) @@ -6,4 +6,6 @@ dependencies { testImplementation(project(":plugins:base:test-utils")) } -configurePublication("gfm-plugin") +registerDokkaArtifactPublication("gfmPlugin") { + artifactId = "gfm-plugin" +} diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts index 5846ee62..5e2e5600 100644 --- a/plugins/javadoc/build.gradle.kts +++ b/plugins/javadoc/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication dependencies { implementation("com.soywiz.korlibs.korte:korte-jvm:1.10.3") @@ -10,4 +10,6 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") } -configurePublication("javadoc-plugin") +registerDokkaArtifactPublication("javadocPlugin") { + artifactId = "javadoc-plugin" +} diff --git a/plugins/jekyll/build.gradle.kts b/plugins/jekyll/build.gradle.kts index 0d1e38d6..64cf9800 100644 --- a/plugins/jekyll/build.gradle.kts +++ b/plugins/jekyll/build.gradle.kts @@ -1,8 +1,10 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication dependencies { implementation(project(":plugins:base")) implementation(project(":plugins:gfm")) } -configurePublication("jekyll-plugin") +registerDokkaArtifactPublication("jekyllPlugin") { + artifactId = "jekyll-plugin" +} diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts index 27e90f84..eda6114f 100644 --- a/plugins/kotlin-as-java/build.gradle.kts +++ b/plugins/kotlin-as-java/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication dependencies { implementation(project(":plugins:base")) @@ -7,4 +7,6 @@ dependencies { testImplementation(project(":test-tools")) } -configurePublication("kotlin-as-java-plugin") +registerDokkaArtifactPublication("kotlinAsJavaPlugin") { + artifactId = "kotlin-as-java-plugin" +} diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts index ea4cdff0..142e7dc4 100644 --- a/plugins/mathjax/build.gradle.kts +++ b/plugins/mathjax/build.gradle.kts @@ -1,3 +1,5 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication -configurePublication("mathjax-plugin") +registerDokkaArtifactPublication("mathjaxPlugin") { + artifactId = "mathjax-plugin" +} diff --git a/runners/cli/build.gradle.kts b/runners/cli/build.gradle.kts index 19a49346..4ad34192 100644 --- a/runners/cli/build.gradle.kts +++ b/runners/cli/build.gradle.kts @@ -1,4 +1,5 @@ -import org.jetbrains.configurePublication +import org.jetbrains.DokkaPublicationBuilder.Component.Shadow +import org.jetbrains.registerDokkaArtifactPublication plugins { id("com.github.johnrengelman.shadow") @@ -26,5 +27,8 @@ tasks { } } -configurePublication("dokka-cli", useShadow = true) +registerDokkaArtifactPublication("dokkaCli"){ + artifactId = "dokka-cli" + component = Shadow +} diff --git a/runners/gradle-plugin/build.gradle.kts b/runners/gradle-plugin/build.gradle.kts index 00e3602e..0222f5e0 100644 --- a/runners/gradle-plugin/build.gradle.kts +++ b/runners/gradle-plugin/build.gradle.kts @@ -47,15 +47,13 @@ gradlePlugin { publishing { publications { - maybeCreate<MavenPublication>("pluginMaven").apply { + register<MavenPublication>("pluginMaven") { artifactId = "dokka-gradle-plugin" - artifact(sourceJar.get()) } register<MavenPublication>("dokkaGradlePluginForIntegrationTests") { artifactId = "dokka-gradle-plugin" from(components["java"]) - artifact(sourceJar.get()) version = "for-integration-tests-SNAPSHOT" } } diff --git a/runners/maven-plugin/build.gradle.kts b/runners/maven-plugin/build.gradle.kts index 83d9f5af..fbd2b48a 100644 --- a/runners/maven-plugin/build.gradle.kts +++ b/runners/maven-plugin/build.gradle.kts @@ -1,6 +1,6 @@ import org.jetbrains.CrossPlatformExec import org.jetbrains.SetupMaven -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication val setupMaven by tasks.register<SetupMaven>("setupMaven") @@ -45,7 +45,10 @@ val generatePom by tasks.registering(Copy::class) { line.replace("<version>dokka_version</version>", "<version>$dokka_version</version>") } filter { line -> - line.replace("<version>maven-plugin-plugin</version>", "<version>${setupMaven.mavenPluginToolsVersion}</version>") + line.replace( + "<version>maven-plugin-plugin</version>", + "<version>${setupMaven.mavenPluginToolsVersion}</version>" + ) } } } @@ -90,4 +93,6 @@ tasks.named<Jar>("jar") { } } -configurePublication("dokka-maven-plugin") +registerDokkaArtifactPublication("dokkaMavenPlugin") { + artifactId = "dokka-maven-plugin" +} diff --git a/testApi/build.gradle.kts b/testApi/build.gradle.kts index 1576dd99..fc882f44 100644 --- a/testApi/build.gradle.kts +++ b/testApi/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.configurePublication +import org.jetbrains.registerDokkaArtifactPublication plugins { `maven-publish` @@ -13,4 +13,6 @@ dependencies { implementation(kotlin("reflect")) } -configurePublication("dokka-test-api") +registerDokkaArtifactPublication("dokkaTestApi") { + artifactId = "dokka-test-api" +} -- cgit From ddccb8d23057d4eb14d5e3e35152e1f4aa00a77d Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" <sebastian.sellmair@jetbrains.com> Date: Wed, 15 Jul 2020 10:54:38 +0200 Subject: Remove markdown repository in favor of jcenter and remove terminate :core:dependencies --- build.gradle.kts | 1 - core/build.gradle.kts | 3 +-- core/dependencies/build.gradle.kts | 35 --------------------------- kotlin-analysis/build.gradle.kts | 1 - kotlin-analysis/dependencies/build.gradle.kts | 4 --- settings.gradle.kts | 1 - 6 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 core/dependencies/build.gradle.kts (limited to 'kotlin-analysis/build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index c6335a31..6c34e04c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,6 @@ allprojects { jcenter() mavenCentral() mavenLocal() - maven(url = "https://dl.bintray.com/jetbrains/markdown/") maven(url = "https://dl.bintray.com/kotlin/kotlin-dev") } } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index b52d3729..168baf48 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -6,8 +6,7 @@ plugins { } dependencies { - api(project("dependencies", configuration = "shadow")) - + api("org.jetbrains:markdown:0.1.45") implementation(kotlin("reflect")) implementation("com.google.code.gson:gson:2.8.5") implementation("org.jsoup:jsoup:1.12.1") diff --git a/core/dependencies/build.gradle.kts b/core/dependencies/build.gradle.kts deleted file mode 100644 index a074958d..00000000 --- a/core/dependencies/build.gradle.kts +++ /dev/null @@ -1,35 +0,0 @@ -import org.jetbrains.DokkaPublicationBuilder.Component.Shadow -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("com.github.johnrengelman.shadow") - `maven-publish` - id("com.jfrog.bintray") -} - -repositories { - maven(url = "https://kotlin.bintray.com/kotlin-plugin") -} - -dependencies { - // TODO (see https://github.com/Kotlin/dokka/issues/1009) - implementation(kotlin("stdlib")) - implementation(kotlin("reflect")) - - implementation("org.jetbrains:markdown:0.1.41") { - because("it's published only on bintray") - } -} - -tasks { - shadowJar { - val dokka_version: String by project - archiveFileName.set("dokka-dependencies-$dokka_version.jar") - archiveClassifier.set("") - } -} - -registerDokkaArtifactPublication("dokkaCoreDependencies") { - artifactId = "dokka-core-dependencies" - component = Shadow -} diff --git a/kotlin-analysis/build.gradle.kts b/kotlin-analysis/build.gradle.kts index f87811e1..8458ecc4 100644 --- a/kotlin-analysis/build.gradle.kts +++ b/kotlin-analysis/build.gradle.kts @@ -11,7 +11,6 @@ dependencies { val kotlin_version: String by project api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version") - api(project(":kotlin-analysis:dependencies", configuration = "shadow")) } diff --git a/kotlin-analysis/dependencies/build.gradle.kts b/kotlin-analysis/dependencies/build.gradle.kts index 4aba6614..a12e697d 100644 --- a/kotlin-analysis/dependencies/build.gradle.kts +++ b/kotlin-analysis/dependencies/build.gradle.kts @@ -30,10 +30,6 @@ dependencies { val idea_version: String by project intellijCore("com.jetbrains.intellij.idea:intellij-core:$idea_version") implementation(intellijCoreAnalysis()) - - implementation("org.jetbrains:markdown:0.1.41") { - because("it's published only on bintray") - } } tasks { diff --git a/settings.gradle.kts b/settings.gradle.kts index 00237615..94364dab 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,7 +1,6 @@ rootProject.name = "dokka" include("core") -include("core:dependencies") include("plugins:base:search-component") include("testApi") include("test-tools") -- cgit