Skip to content

Commit 342716d

Browse files
authored
Fix Gradle 10 issue in DefaultNmcpSettings (#270)
Fix the Gradle 10 deprecation warning in `DefaultNmcpSettings` by using `DependencyHandler.project()` instead of `DependencyHandler.create()`. Using the other recommended way via `DependencyFactory.createProjectDependency()` isn't available in NMCP's min Gradle-API version 8.8. Warning message and location: ``` Using a Project object as a dependency notation has been deprecated. This will fail with an error in Gradle 10. Please use the project(String) method on DependencyHandler or the createProjectDependency(String) method on DependencyFactory instead. Consult the upgrading guide for further information: https://docs.gradle.org/9.6.1/userguide/upgrading_version_9.html#dependency_project_notation at nmcp.internal.DefaultNmcpSettings.lambda$0$1(DefaultNmcpSettings.kt:37) at nmcp.internal.DefaultNmcpSettings.lambda$0$2(DefaultNmcpSettings.kt:36) ```
1 parent 5af3aa6 commit 342716d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nmcp/src/main/kotlin/nmcp/internal/DefaultNmcpSettings.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ abstract class DefaultNmcpSettings(settings: Settings): NmcpSettings {
3434
}
3535

3636
project.allprojects {
37-
project.dependencies.add(nmcpConsumerConfigurationName, project.dependencies.create(it))
37+
project.dependencies.add(nmcpConsumerConfigurationName,
38+
project.dependencies.project(mapOf("path" to it.path)))
3839
}
3940
}
4041
project.pluginManager.withPlugin("maven-publish") {

0 commit comments

Comments
 (0)