0

I have project with 20+ subprojects:

war {
    dependencies {
        runtime project(':project1')
        runtime project(':project2')
...
        runtime project(':project20')
    }

I would like to avoid duplication of project names here and in settings.gradle. How can I add dependencies on subprojects programmatically?

isobretatel
  • 3,812
  • 7
  • 34
  • 49

1 Answers1

1

You mean like this?

war {
    dependencies {
        subprojects.each { runtime it }
    }
}
Vampire
  • 35,631
  • 4
  • 76
  • 102