melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
659 stars 88 forks source link

The usage of the method `setCanBeResolved` makes plugin incompatible with Gradle 9 #257

Closed bmuschko closed 8 months ago

bmuschko commented 8 months ago

Describe the bug

The plugin uses a deprecated API that will be removed with Gradle 9. The warning message can be reproduced with Gradle 8.4.

To Reproduce

build.gradle:

plugins {
    id "me.champeau.jmh" version "0.7.1"
}

repositories {
    mavenCentral()
}

Execute with:

./gradlew help --warning-mode all

> Configure project :
The resolvable usage is already allowed on configuration ':jmhRuntimeClasspath'. This behavior has been deprecated. This behavior is scheduled to be removed in Gradle 9.0. Remove the call to setCanBeResolved(true), it has no effect. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#redundant_configuration_usage_activation
vandmo commented 8 months ago

I think that this is fixed but not released yet. You could compile locally ./gradlew publishToMavenLocal -Pversion=0.0.1-dev and try it out to verify.

I am patiently waiting for this to be released :)

melix commented 8 months ago

I have released version 0.7.2 which should fix this issue, thanks!

bmuschko commented 8 months ago

Thanks!