Per-configuration failOnVersionConflict?


(Mike Snare) #1

I have failOnVersionConflict turned on for configurations.all in my root project. I’m trying to add gretty to a child project for use in development only, and it is downloading a lot of dependencies that have conflicting transient dependencies.

I don’t honestly care all that much about those conflicts so rather than have to register them as forced versions I’d prefer to just disable the failOnVersionConflict for this one configuration. Is that possible?


(Mark Vieira) #2

Sure, just don’t call failOnVersionConflict() for that configuration.

configurations.all {
    if (name != 'gretty') {
        resolutionStrategy.failOnVersionConflict()
    }
}

(Mike Snare) #3

Perfect. Didn’t know I could use that syntax.

Thanks!