Demo entry 6350692

Configurations

   

Submitted by anonymous on Mar 13, 2017 at 14:56
Language: Groovy. Code size: 449 Bytes.

configurations {
    compile
    test {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == "junit" && details.requested.name == "junit"
                    && details.requested.version == "4.12") {
                      details.useVersion "4.8"
            }
        }
    }
    test.extendsFrom compile
}
   
dependencies {
    compile group: "junit", name: "junit", version: "4.12"
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).