diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6fa09ab4..1815a8a2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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=` minSupportedGradle = "7.4" diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 13d641d0..b46c4f7a 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -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")) } } } @@ -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().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") }