From 1c2583c18ba75aa7d5436d6a78da0b03acd63071 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <niko@krismer.de> Date: Mon, 14 Apr 2014 16:24:48 +0200 Subject: [PATCH] simplified testNG task --- build.gradle | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 11af8a56..146865ce 100644 --- a/build.gradle +++ b/build.gradle @@ -164,11 +164,11 @@ eclipse { // See: http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided // Sets output folders for compiled classes and resources... otherwise test classes/resources would be deployed to wtp server whenMerged { cp -> - cp.entries.findAll { it.path.startsWith("src/main/") }*.output = "bin" - cp.entries.findAll { it.path.startsWith("src/test/") }*.output = "bin-test" + cp.entries.findAll { it.path.startsWith('src/main/') }*.output = 'bin' + cp.entries.findAll { it.path.startsWith('src/test/') }*.output = 'bin-test' // Sets JavaSE as jdk version used (instead of version directly) cp.entries.findAll { it.path.contains('JRE_CONTAINER') }.each { - it.path += "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-" + sourceCompatibility + it.path += '/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + sourceCompatibility } } } @@ -242,21 +242,13 @@ publishing { } test { - useTestNG() - - // turn on gradle xml report - options { - listeners << 'org.testng.reporters.XMLReporter' + useTestNG { + useDefaultListeners = true } - // turn off Gradle's HTML report to avoid replacing the - // reports generated by TestNG library: - reports.junitXml.enabled = false - reports.html.enabled = false - ignoreFailures = true - minHeapSize = "128m" - maxHeapSize = "1024m" + minHeapSize = '128m' + maxHeapSize = '1024m' } test.doFirst { @@ -287,14 +279,14 @@ task javadocJar(type: Jar, dependsOn: javadoc) { description = 'Builds a jar file including javadoc' from javadoc.destinationDir - classifier "javadoc" + classifier 'javadoc' } task sourcesJar(type: Jar, dependsOn: classes) { description = 'Builds a jar file including sources' from sourceSets.main.allSource - classifier "sources" + classifier 'sources' } task staticJar(type: Jar) { -- GitLab