Skip to content

Commit 49fc804

Browse files
committed
Update publish-plugin to published signed plugin artifacts
Closes #115
1 parent da3e2bb commit 49fc804

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
kotlin = "2.0.20"
55
kotlin-for-gradle-plugin = "2.0.20" # Kotlin 2.1 removes support for the used language version / api version: KT-60521
66
kotlinx-binaryCompatibilityValidator = "0.16.2"
7-
kotlinx-teamInfra = "0.4.0-dev-81"
7+
kotlinx-teamInfra = "0.4.0-dev-84"
88
squareup-kotlinpoet = "1.3.0"
99
jmh = "1.21"
10-
gradle-pluginPublish = "0.21.0"
10+
gradle-pluginPublish = "1.3.1"
1111

1212
# Note: This version can be overridden by passing `-Pmin_supported_gradle_version=<version>`
1313
minSupportedGradle = "7.4"

plugin/build.gradle.kts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,17 @@ repositories {
5252
}
5353
}
5454

55-
pluginBundle {
55+
gradlePlugin {
5656
website = "https://github.com/Kotlin/kotlinx-benchmark"
5757
vcsUrl = "https://github.com/Kotlin/kotlinx-benchmark.git"
58-
tags = listOf("benchmarking", "multiplatform", "kotlin")
59-
}
6058

61-
gradlePlugin {
6259
plugins {
6360
register("benchmarkPlugin") {
64-
id = "org.jetbrains.kotlinx.benchmark"
61+
id = "io.github.fzhinkin.benchmark"//"org.jetbrains.kotlinx.benchmark"
6562
implementationClass = "kotlinx.benchmark.gradle.BenchmarksPlugin"
6663
displayName = "Gradle plugin for benchmarking"
6764
description = "Toolkit for running benchmarks for multiplatform Kotlin code."
65+
tags.set(listOf("benchmarking", "multiplatform", "kotlin"))
6866
}
6967
}
7068
}
@@ -178,6 +176,19 @@ if (project.findProperty("publication_repository") == "space") {
178176
}
179177
}
180178

179+
// Both kotlinx.team.infra and Gradle publish plugins register their own javadocJar artifacts.
180+
// We remove one of them here to avoid the collision leading to a build failure.
181+
tasks.withType<AbstractPublishToMaven>().configureEach {
182+
doFirst {
183+
this as AbstractPublishToMaven
184+
val artifactsSet = publication.artifacts
185+
val javadocJars = artifactsSet.filter { it.classifier == "javadoc" }.toList()
186+
javadocJars.drop(1).forEach {
187+
artifactsSet.remove(it)
188+
}
189+
}
190+
}
191+
181192
apiValidation {
182193
nonPublicMarkers += listOf("kotlinx.benchmark.gradle.internal.KotlinxBenchmarkPluginInternalApi")
183194
}

0 commit comments

Comments
 (0)