import org.gradle.api.tasks.testing.logging.TestLogEvent import org.gradle.api.tasks.testing.logging.TestExceptionFormat apply plugin: 'groovy' repositories { jcenter() } dependencies { compile 'org.codehaus.groovy:groovy-all:2.4.11' compile 'com.cloudbees:groovy-cps:1.24' testCompile 'junit:junit:4.12' } sourceSets { main { groovy { srcDirs = ['src'] } } test { groovy { srcDirs = ['test'] } } } groovydoc { use = true } test { testLogging { exceptionFormat TestExceptionFormat.FULL events TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED info { events TestLogEvent.STARTED, TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR } debug.events = info.events } // Can be used for remote debugging in IntelliJ if (System.getProperty('DEBUG', '0') == '1') { jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9099' } } /** * Build task used to preload all dependencies. */ task deps(type: Exec) { // Simply reading testRuntime.files will cause gradle to resolve/install // runtime and test dependencies configurations.testRuntime.files commandLine 'true' }