Hi!
So I have this platform dependency in my com.example:service Kotlin DSL project:
implementation(platform("com.example.lib:bom:10.1"))
and inside that bom, there is the dependency:
api("com.example.model:model:10.1")
Okay, so a transitive dependency on com.example.model:model:10.1, no problem so far, but I want to upgrade the com.example:service to depend on com.example.model:model:11.0 so I add:
implementation("com.example.model:model:11.0")
But gradle forces the dependency to be on com.example.model:model:10.1. Okay, so problem, exclude it from the bom dependency:
implementation(platform("com.example.lib:bom:10.1")) {
exclude(group = "com.example.model")
}
But I get the error:
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public fun Configuration.exclude(group: String? = …, module: String? = …): Configuration defined in org.gradle.kotlin.dsl
How can I solve this problem?