From 491d16f155ca425ed77e8987a50da76aa9af76aa Mon Sep 17 00:00:00 2001 From: Marcin Zajaczkowski Date: Mon, 5 Jan 2015 23:41:19 +0100 Subject: [PATCH] [#132] Globally replace groovy-* modules with groovy-all To prevent leaking out both groovy-[core,xml,json] and groovy-all. --- build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e87a0f42..9b459c4f 100644 --- a/build.gradle +++ b/build.gradle @@ -65,6 +65,12 @@ allprojects { eachDependency { DependencyResolveDetails details -> if (details.requested.group == 'org.slf4j') { details.useVersion '1.7.9' } if (details.requested.group == 'com.fasterxml.jackson.core') { details.useVersion "2.4.4" } + + // To prevent an accidental usage of groovy-all.jar and groovy.jar in different versions + // all modularized Groovy jars are replaced with groovy-all.jar by default. + if (details.requested.group == 'org.codehaus.groovy' && details.requested.name != "groovy-all") { + details.useTarget("org.codehaus.groovy:groovy-all:${details.requested.version}") + } } } } @@ -79,7 +85,7 @@ task addHashFile << { } -configure(emptySubprojects) { +configure(emptySubprojects + rootProject) { apply plugin: 'base' }