diff --git a/build.gradle b/build.gradle index f57e7d26239..f9925ec5a6f 100644 --- a/build.gradle +++ b/build.gradle @@ -200,7 +200,11 @@ subprojects { project -> dependencies { compile groovyDependency - testCompile("org.codehaus.groovy:groovy-test:${groovyVersion}") + testCompile "org.codehaus.groovy:groovy-test:${groovyVersion}", { + exclude group:'junit', module: 'junit' + exclude group:'org.codehaus.groovy', module: 'groovy' + exclude group:'org.hamcrest', module: 'hamcrest-core' + } if (project.name != "grails-docs") { // Logging diff --git a/grails-docs/build.gradle b/grails-docs/build.gradle index 40929755eac..793559f89e2 100644 --- a/grails-docs/build.gradle +++ b/grails-docs/build.gradle @@ -21,6 +21,8 @@ dependencies { testCompile "junit:junit:$junitVersion" testCompile("org.spockframework:spock-core:${spockVersion}") { transitive = false + exclude group:'junit', module: 'junit-dep' + exclude group:'org.codehaus.groovy', module: 'groovy-all' } } diff --git a/grails-plugin-testing/build.gradle b/grails-plugin-testing/build.gradle index b7e0081263b..ee032491b76 100644 --- a/grails-plugin-testing/build.gradle +++ b/grails-plugin-testing/build.gradle @@ -17,9 +17,12 @@ dependencies { } compile "org.springframework.boot:spring-boot-starter-test:$springBootVersion" compile("org.spockframework:spock-spring:${spockVersion}") { + transitive = false + exclude group:'junit', module: 'junit-dep' exclude group:'org.codehaus.groovy', module: 'groovy-all' } compile("org.spockframework:spock-core:${spockVersion}") { + transitive = false exclude group:'junit', module: 'junit-dep' exclude group:'org.codehaus.groovy', module: 'groovy-all' } diff --git a/grails-test/build.gradle b/grails-test/build.gradle index f7bdf9b5416..04c79fac630 100644 --- a/grails-test/build.gradle +++ b/grails-test/build.gradle @@ -3,11 +3,17 @@ dependencies { compile "org.springframework:spring-tx:${springVersion}" // Testing - compile "org.codehaus.groovy:groovy-test:$groovyVersion" + compile "org.codehaus.groovy:groovy-test:$groovyVersion", { + transitive = false + exclude group:'junit', module: 'junit' + exclude group:'org.codehaus.groovy', module: 'groovy' + exclude group:'org.hamcrest', module: 'hamcrest-core' + } compile "junit:junit:${junitVersion}", { exclude group:'org.hamcrest', module: 'hamcrest-core' } compile("org.spockframework:spock-core:${spockVersion}") { + transitive = false exclude group:'junit', module: 'junit-dep' exclude group:'org.codehaus.groovy', module: 'groovy-all' }