Skip to content

Update publish-plugin to published signed plugin artifacts #295

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
kotlin = "2.0.20"
kotlin-for-gradle-plugin = "2.0.20" # Kotlin 2.1 removes support for the used language version / api version: KT-60521
kotlinx-binaryCompatibilityValidator = "0.16.2"
kotlinx-teamInfra = "0.4.0-dev-81"
kotlinx-teamInfra = "0.4.0-dev-84"
squareup-kotlinpoet = "1.3.0"
jmh = "1.21"
gradle-pluginPublish = "0.21.0"
gradle-pluginPublish = "1.3.1"

# Note: This version can be overridden by passing `-Pmin_supported_gradle_version=<version>`
minSupportedGradle = "7.4"
Expand Down
19 changes: 15 additions & 4 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,17 @@ repositories {
}
}

pluginBundle {
gradlePlugin {
website = "https://github.com/Kotlin/kotlinx-benchmark"
vcsUrl = "https://github.com/Kotlin/kotlinx-benchmark.git"
tags = listOf("benchmarking", "multiplatform", "kotlin")
}

gradlePlugin {
plugins {
register("benchmarkPlugin") {
id = "org.jetbrains.kotlinx.benchmark"
implementationClass = "kotlinx.benchmark.gradle.BenchmarksPlugin"
displayName = "Gradle plugin for benchmarking"
description = "Toolkit for running benchmarks for multiplatform Kotlin code."
tags.set(listOf("benchmarking", "multiplatform", "kotlin"))
}
}
}
Expand Down Expand Up @@ -178,6 +176,19 @@ if (project.findProperty("publication_repository") == "space") {
}
}

// Both kotlinx.team.infra and Gradle publish plugins register their own javadocJar artifacts.
// We remove one of them here to avoid the collision leading to a build failure.
tasks.withType<AbstractPublishToMaven>().configureEach {
doFirst {
this as AbstractPublishToMaven
val artifactsSet = publication.artifacts
val javadocJars = artifactsSet.filter { it.classifier == "javadoc" }.toList()
javadocJars.drop(1).forEach {
artifactsSet.remove(it)
}
}
}

apiValidation {
nonPublicMarkers += listOf("kotlinx.benchmark.gradle.internal.KotlinxBenchmarkPluginInternalApi")
}