Hi, what is the best way to centralize test depend...
# gradle
e
Hi, what is the best way to centralize test dependencies or non-runtime dependencies? I have a project that currently centralizes a bunch of dependencies with the api configuration so that I can just add it with
implementation(project(":myLibs"))
, but I'd like to be able to do something akin to
testImplementation(project(":myLibs", configuration = "testImplementation"))
or
compileOnly(project(":myLibs", configuration = "compileOnly"))
. I've already tried the latter and know that doesn't work. I know it could be done with a convention plugin, but I'm asking here in case there are better options.
v
Define your dependencies as bundle in the version catalog, then you can just add the bundle as dependency
👍🏻 1
But your question has nothing to do with Kotlin, so it is off-topic here. ;-)