Sergey Chelombitko
04/04/2024, 11:03 AMjava {
registerFeature("api") {
usingSourceSet(sourceSets.create("api"))
}
}
I'm following the documentation, but getting a warning:
> Configure project :MyPlugin
The resolvable usage is already allowed on configuration ':MyPlugin:apiRuntimeClasspath'. 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.6/userguide/upgrading_version_8.html#redundant_configuration_usage_activation>
at build_9r8pzu5e0o5ivhas2a4kdj4xn$_run_closure1$_closure4.doCall$original(/Users/sergey/Projects/plugins/MyPlugin/build.gradle:9)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
This might have something to do with Kotlin plugin being applied.Caleb Cushing
04/04/2024, 11:20 AMval demoServer by sourceSets.creating
java {
registerFeature("demoServer") {
usingSourceSet(demoServer)
}
}
val demoServerImplementation by configurations.existing
val demoServerRuntimeOnly by configurations.existing
Caleb Cushing
04/04/2024, 11:21 AMVampire
04/04/2024, 11:24 AM--stacktrace
you also see it comes from Kotlin Plugin.Adam
04/04/2024, 12:01 PMThis might have something to do with Kotlin plugin being applied.That's probably correct. KGP sometimes modifies the Java plugin's configurations, which now triggers a Gradle deprecation. https://youtrack.jetbrains.com/issue/KT-66542
Sergey Chelombitko
04/04/2024, 12:15 PM