From 9ff9d45283b5aad6eb8b97775a406a4fbdb74782 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 30 Jul 2013 10:33:52 -0700 Subject: [PATCH] Minor polish to gradle build --- build.gradle | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 7fbc19cb592..795e0fcbdb8 100644 --- a/build.gradle +++ b/build.gradle @@ -63,6 +63,9 @@ configure(allprojects) { project -> test { systemProperty("java.awt.headless", "true") systemProperty("testGroups", project.properties.get("testGroups")) + scanForTestClasses = false + include '**/*Tests.*' + exclude '**/*Abstract*.*' } repositories { @@ -157,7 +160,7 @@ project("spring-build-src") { dependencies { compile gradleApi() - groovy localGroovy() + compile localGroovy() } configurations.archives.artifacts.clear() @@ -661,21 +664,6 @@ project("spring-webmvc-portlet") { project("spring-test") { description = "Spring TestContext Framework" - task testNG(type: Test) { - useTestNG() - // "TestCase" classes are run by other test classes, not the build. - exclude "**/*TestCase.class" - // Generate TestNG reports alongside JUnit reports. - testReport true - } - - test { - dependsOn testNG - useJUnit() - // "TestCase" classes are run by other test classes, not the build. - exclude(["**/*TestCase.class", "**/*TestSuite.class"]) - } - dependencies { compile(project(":spring-core")) optional(project(":spring-beans")) @@ -700,6 +688,21 @@ project("spring-test") { testCompile "org.slf4j:slf4j-jcl:${slf4jVersion}" testCompile("hsqldb:hsqldb:${hsqldbVersion}") } + + task testNG(type: Test) { + useTestNG() + // "TestCase" classes are run by other test classes, not the build. + exclude "**/*TestCase.class" + // Generate TestNG reports alongside JUnit reports. + testReport true + } + + test { + dependsOn testNG + useJUnit() + // "TestCase" classes are run by other test classes, not the build. + exclude(["**/*TestCase.class", "**/*TestSuite.class"]) + } } project("spring-test-mvc") {