Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update com.gradle.plugin-publish 1.2.0 #2919

Closed
wants to merge 14 commits into from
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id("org.jetbrains.conventions.dokka")

alias(libs.plugins.kotlinx.binaryCompatibilityValidator)
alias(libs.plugins.gradle.pluginPublish)
alias(libs.plugins.gradle.pluginPublish) apply false
alias(libs.plugins.nexusPublish)
}

Expand Down
58 changes: 23 additions & 35 deletions runners/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ plugins {
`kotlin-dsl`
id("org.jetbrains.conventions.maven-publish")
id("org.jetbrains.conventions.base-java")
id("com.gradle.plugin-publish")
alias(libs.plugins.gradle.pluginPublish)
signing
}

dependencies {
Expand Down Expand Up @@ -42,51 +43,38 @@ fun Configuration.excludeGradleCommonDependencies() {
}
}

group = "org.jetbrains.dokka"
version = dokkaVersion

@Suppress("UnstableApiUsage")
gradlePlugin {
website.set("https://www.kotlinlang.org/")
vcsUrl.set("https://github.com/kotlin/dokka.git")

plugins {
create("dokkaGradlePlugin") {
all {
id = "org.jetbrains.dokka"
implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin"
tags.set(listOf("dokka", "kotlin", "kdoc", "android", "documentation"))
}
create("dokkaGradlePlugin") {
displayName = "Dokka plugin"
description = "Dokka, the Kotlin documentation tool"
implementationClass = "org.jetbrains.dokka.gradle.DokkaPlugin"
version = dokkaVersion
isAutomatedPublishing = true
}
}
}

pluginBundle {
website = "https://www.kotlinlang.org/"
vcsUrl = "https://github.com/kotlin/dokka.git"
tags = listOf("dokka", "kotlin", "kdoc", "android", "documentation")

mavenCoordinates {
groupId = "org.jetbrains.dokka"
artifactId = "dokka-gradle-plugin"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not very sure how to configure artifactId.

}
}

publishing {
publications {
register<MavenPublication>("dokkaGradlePluginForIntegrationTests") {
artifactId = "dokka-gradle-plugin"
from(components["java"])
register("dokkaGradlePluginForIntegrationTests") {
version = "for-integration-tests-SNAPSHOT"
}

register<MavenPublication>("pluginMaven") {
configurePom("Dokka ${project.name}")
artifactId = "dokka-gradle-plugin"
}

afterEvaluate {
named<MavenPublication>("dokkaGradlePluginPluginMarkerMaven") {
Goooler marked this conversation as resolved.
Show resolved Hide resolved
configurePom("Dokka plugin")
}
register("pluginMaven") {
id = "dokka-gradle-plugin"
}
}
}

signing {
isRequired = false
}

tasks.validatePlugins {
enableStricterValidation.set(true)
}
Expand All @@ -96,8 +84,8 @@ tasks.withType<PublishToMavenRepository>().configureEach {
}

afterEvaluate { // Workaround for an interesting design choice https://github.com/gradle/gradle/blob/c4f935f77377f1783f70ec05381c8182b3ade3ea/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/MavenPluginPublishPlugin.java#L49
configureSpacePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven")
configureSonatypePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven")
configureSpacePublicationIfNecessary("pluginMaven")
configureSonatypePublicationIfNecessary("pluginMaven")
createDokkaPublishTaskIfNecessary()
}

Expand Down

This file was deleted.