i have a more general project layout question: i have a gradle project with submodules ... commons, test-commons and app ... test-commons has only external dependencies, commons depends on test-commons .. and app has the dependency commons and the test dependency test-commons. now in my test-commons i use for example the library wiremock, so i added implementation("com.github.tomakehurstwiremock jre82.27.2"). if i want to have wiremock also in commons as test dependency there are 2 ways to do that. instead of implementation("wiremock") in test-commons i could use api("wiremock") which exposes wiremock to all projects which depend on test-commons. the other way would be to use testImplementation("wiremock") in my test.kotlin-common-conventions.gradle.kts and just use the same version. but that feels somehow not clean (because i would have to reuse the version somehow). any ideas on that?
t
Tucker Barbour
10/20/2020, 7:45 PM
I use a
java-platform
to ensure the same version for all sub projects
Tucker Barbour
10/20/2020, 7:46 PM
not sure if that solves this particular layout question but it helps to solve keeping the same version of an external dependency which is common across subprojects
b
bitkid
10/20/2020, 8:01 PM
that looks interesting .. thx!
bitkid
10/20/2020, 8:14 PM
atm i go for the api approach .. because i am not exposing the sub project to the outside world and internally i don't really care