Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19854

Constraining dependencies in all configurations

$
0
0

I’ve been using the dependency constraining feature to replace my old method of storing dependencies in string literals. The same constraints are applied on all configurations:

dependencies {
  constraints {
     ['implementation', 'testImplementation'].each { 
        "$it" "com.google.guava:guava:26.0-jre" 
        "$it" "some:other-dependency:v1"
     }
  }
}

Is there an easy way to do this without listing all configurations explicitly?


Viewing all articles
Browse latest Browse all 19854

Trending Articles