I’ve got a subproject (let’s call it mySubProject), from which I’d like to access the archived jars of some other subprojects via a dependency configuration.
But I don’t want to define those project dependencies explicitly, but rather add them to my configuration dynamically. I’ve written some kind of loop that iterates over those project names:
loop {
dependencies.add("myConfigurationName", "project(path: ':$projectName', configuration: 'archives')")
}
But if I try to access them by something like this:
task printConfig << {
configurations.myConfigurationName.files.each { File file ->
println file.name
}
}
I get
“Could not find project(path: ‘:someSubprojectName’, configuration.” Required by:
src: mySubProject:0.0.0.1"