I got 2 modules, module A and module B. Module B depends on module A, module A shares dependency libraries to module B by using api
configuration.
When set
This is Chris Margonis (Kudos!) answer in Kotlin-DSL:
// "base" module/project
configurations {
create("testDependencies"){
extendsFrom(configurations.testImplementation.get())
}
}
dependencies {
// example test dependency
testImplementation "junit:junit:4.12"
// .. other testImplementation dependencies here
}
//another module
dependencies {
testImplementation(project(path = ":base", configuration = "testDependencies"))
}