hi, I wanted to exclude a transitive dependency in one of the platforms dependencies im my gradle configuration, but I get the error message
Could not find method api() for arguments [project ':...', build_ckdfo2mkuty2268dk8wzojs1m$_run_closure1$_closure2$_closure4$_closure5@5af0b522] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.
You can probably do something similar (example in Kotlin, no idea about Groovy):
Copy code
api(project("…").apply {
exclude("…", "…")
})
j
Jens Baitinger
05/03/2019, 12:17 PM
thanks @Marc Knaup, I tried that by switching to kotlin syntax, which I avoided as the groovy syntax is a bit cleaner, but the error messages are a lot cleaner then the groovy errors…
syntactically there is no error, but the exclusion seams not to work, its still in the classpath…
m
Marc Knaup
05/03/2019, 12:19 PM
That is either a bug then or unsupported 😕
In both cases it makes sense to report on YouTrack.
Marc Knaup
05/03/2019, 12:19 PM
I find the Kotlin syntax cleaner because it's easier to reason about what's happening. Groovy while shorter has much more magic involved.