Why does gradle not find junit?

my build file jar’s ok, but the test step fails with:

14:58:57.265 [ERROR] [system.err] D:\home\ray\dev\indigoapps\jat\tst\MySetTestCase.java:1: package org.junit does not exist 14:58:57.265 [ERROR] [system.err] import static org.junit.Assert.*;

my build file is below.

thanks

apply plugin: ‘java’ apply plugin: ‘eclipse’ apply plugin: ‘maven’ repositories { mavenCentral() } sourceSets.main.java.srcDirs=[“src”, “tst”] dependencies {

compile fileTree(dir: ‘lib’, includes: [’*.jar’])

testCompile group: ‘junit’,name:‘junit’,version: ‘4.8+’ }

Hello Ray, this snippet works just fine for me. Can you check that junit is downloaded correctly? (for debugging correct downloads, I often use the “-g .” flag) To see the detailed classpath used for compilation in the compileTestJava task by running gradle in debug mode (-d option)

regards, René

i am a newbie. i had not junit jar in lib/. so i added one.

i then built and it downloaded junit from maven and gradle jar worked.

if i remove the junit jar from lib it fails again.

seems strange.

gradle test does not seem to find any tests.

there is some junit stuff in the log below from gradle -d test

thanks

18:45:00.968 [INFO] [org.gradle.BuildLogger] Starting Build 18:45:00.984 [DEBUG] [org.gradle.BuildLogger] Gradle user home: C:\Documents and Settings\ray.gradle 18:45:00.984 [DEBUG] [org.gradle.BuildLogger] Current dir: D:\home\ray\dev\indigoapps\jat 18:45:00.984 [DEBUG] [org.gradle.BuildLogger] Settings file: null 18:45:00.984 [DEBUG] [org.gradle.BuildLogger] Build file: null 18:45:00.984 [DEBUG] [org.gradle.BuildLogger] Select default project: with project directory ‘D:\home\ray\dev\indigoapps\jat’ 18:45:01.000 [DEBUG] [org.gradle.initialization.BuildSourceBuilder] Starting to build the build sources. 18:45:01.000 [DEBUG] [org.gradle.initialization.BuildSourceBuilder] Gradle source dir does not exist. We leave. 18:45:01.000 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: [] 18:45:01.000 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: [] 18:45:01.296 [DEBUG] [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing: Processing settings took: 0.296 secs 18:45:01.296 [INFO] [org.gradle.BuildLogger] Settings evaluated using empty settings file. 18:45:01.312 [DEBUG] [org.gradle.initialization.BuildLoader] Loading Project objects 18:45:01.375 [DEBUG] [org.gradle.initialization.BuildLoader] Looking for project properties from: D:\home\ray\dev\indigoapps\jat\gradle.properties 18:45:01.375 [DEBUG] [org.gradle.initialization.BuildLoader] project property file does not exists. We continue! 18:45:01.375 [DEBUG] [org.gradle.initialization.BuildLoader] Timing: Loading projects took: 0.063 secs 18:45:01.375 [INFO] [org.gradle.BuildLogger] Projects loaded. Root project using build file ‘D:\home\ray\dev\indigoapps\jat\build.gradle’. 18:45:01.375 [INFO] [org.gradle.BuildLogger] Included projects: [root project ‘jat’] 18:45:01.390 [INFO] [org.gradle.configuration.BuildScriptProcessor] Evaluating root project ‘jat’ using build file ‘D:\home\ray\dev\indigoapps\jat\build.gradle’. 18:45:01.906 [DEBUG] [org.gradle.messaging.remote.internal.TcpOutgoingConnector] Found loop-back addresses: [/127.0.0.1]. 18:45:02.265 [DEBUG] [org.gradle.configuration.BuildScriptProcessor] Timing: Running the build script took 0.875 secs 18:45:02.312 [INFO] [org.gradle.BuildLogger] All projects evaluated. 18:45:02.359 [DEBUG] [org.gradle.execution.DefaultTaskGraphExecuter] Timing: Creating the DAG took 0.016 secs 18:45:02.359 [INFO] [org.gradle.initialization.DefaultGradleLauncher] Starting build for primary task ‘test’. 18:45:02.359 [INFO] [org.gradle.BuildLogger] Tasks to be executed: [task ‘:compileJava’, task ‘:processResources’, task ‘:classes’, task ‘:compileTestJava’, task ‘:processTestResources’, task ‘:testClasses’, task ‘:test’] 18:45:02.359 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :compileJava 18:45:02.359 [DEBUG] [org.gradle.api.internal.tasks.SkipTaskExecuter] Starting to execute task ‘:compileJava’ 18:45:02.359 [DEBUG] [org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTaskExecuter] Determining if task ‘:compileJava’ is up-to-date 18:45:02.484 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.default.settings.dir’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings’ 18:45:02.484 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.basedir’ to ‘D:\home\ray\dev\indigoapps\jat.’ 18:45:02.484 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.default.conf.dir’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.runtime.name’ to ‘Java™ SE Runtime Environment’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.boot.library.path’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\bin’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.version’ to ‘20.1-b02’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vendor.url’ to ‘http://java.sun.com/’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘path.separator’ to ‘;’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.name’ to ‘Java HotSpot™ Client VM’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘file.encoding.pkg’ to ‘sun.io’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.java.launcher’ to ‘SUN_STANDARD’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.country’ to ‘US’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.os.patch.level’ to ‘Service Pack 3’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.specification.name’ to ‘Java Virtual Machine Specification’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.dir’ to ‘D:\home\ray\dev\indigoapps\jat’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.runtime.version’ to ‘1.6.0_26-b03’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.awt.graphicsenv’ to ‘sun.awt.Win32GraphicsEnvironment’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.endorsed.dirs’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\lib\endorsed’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘os.arch’ to ‘x86’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.io.tmpdir’ to ‘D:\cygwin\tmp’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘line.separator’ to ’ ’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘org.gradle.appname’ to ‘gradle’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.specification.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.variant’ to ‘’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘os.name’ to ‘Windows XP’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.jnu.encoding’ to ‘Cp1252’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.library.path’ to ‘C:\Program Files\Java\jdk1.6.0_26\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\cygwin\usr\local\bin;D:\cygwin\bin;D:\cygwin\bin;D:\bin\gs\gs9.00\bin;D:\dev\webtest-3.0\bin;D:\bin\WinSCP;D:\dev\bin;D:\dev\curl-7.19.5-devel-mingw32\bin;C:\Program Files\Graphviz2.24\bin;D:\dev\unixutils\usr\local\wbin;D:\dev\unixutils\bin;D:\dev\gwt-2.2.0;D:\bin;D:\dev\gradle-0.9.2\bin;D:\dev\gant-1.6.1\bin;D:\dev\griffon-0.9.4\bin;D:\dev\grails-2.0.0\bin;D:\dev\groovy-1.8.5\bin;D:\dev\apache-tomcat-7.0.4\bin;D:\dev\apache-ant-1.7.1\bin;C:\Program Files\Java\jdk1.6.0_26\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;.’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.specification.name’ to ‘Java Platform API Specification’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.class.version’ to ‘50.0’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.management.compiler’ to ‘HotSpot Client Compiler’ 18:45:02.515 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘os.version’ to ‘5.1’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.home’ to ‘C:\Documents and Settings\ray’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.timezone’ to ‘America/Los_Angeles’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.awt.printerjob’ to ‘sun.awt.windows.WPrinterJob’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘file.encoding’ to ‘Cp1252’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.specification.version’ to ‘1.6’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.class.path’ to ‘D:/dev/gradle-0.9.2/lib/gradle-launcher-0.9.2.jar’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.name’ to ‘ray’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.specification.version’ to ‘1.0’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.java.command’ to ‘org.gradle.launcher.GradleMain -d test’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.home’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.arch.data.model’ to ‘32’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.language’ to ‘en’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.specification.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘awt.toolkit’ to ‘sun.awt.windows.WToolkit’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.info’ to ‘mixed mode, sharing’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.version’ to ‘1.6.0_26’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.ext.dirs’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.boot.class.path’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\modules\jdk.boot.jar;C:\Program Files\Java\jdk1.6.0_26\jre\classes’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘file.separator’ to ‘’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vendor.url.bug’ to ‘http://java.sun.com/cgi-bin/bugreport.cgi’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.io.unicode.encoding’ to ‘UnicodeLittle’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.cpu.endian’ to ‘little’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.desktop’ to ‘windows’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.cpu.isalist’ to ‘pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.cache.dir’ to ‘C:\Documents and Settings\ray.gradle\cache’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.log.modules.in.use’ to ‘false’ 18:45:02.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.DefaultSettingsConverter] Timing: Ivy convert for resolve took 0.078 secs 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.default.settings.dir’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.basedir’ to ‘D:\home\ray\dev\indigoapps\jat.’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.default.conf.dir’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.runtime.name’ to ‘Java™ SE Runtime Environment’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.boot.library.path’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\bin’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.version’ to ‘20.1-b02’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vendor.url’ to ‘http://java.sun.com/’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘path.separator’ to ‘;’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.name’ to ‘Java HotSpot™ Client VM’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘file.encoding.pkg’ to ‘sun.io’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.java.launcher’ to ‘SUN_STANDARD’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.country’ to ‘US’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.os.patch.level’ to ‘Service Pack 3’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.specification.name’ to ‘Java Virtual Machine Specification’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.dir’ to ‘D:\home\ray\dev\indigoapps\jat’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.runtime.version’ to ‘1.6.0_26-b03’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.awt.graphicsenv’ to ‘sun.awt.Win32GraphicsEnvironment’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.endorsed.dirs’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\lib\endorsed’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘os.arch’ to ‘x86’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.io.tmpdir’ to ‘D:\cygwin\tmp’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘line.separator’ to ’ ’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘org.gradle.appname’ to ‘gradle’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.specification.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.variant’ to ‘’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘os.name’ to ‘Windows XP’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.jnu.encoding’ to ‘Cp1252’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.library.path’ to ‘C:\Program Files\Java\jdk1.6.0_26\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\cygwin\usr\local\bin;D:\cygwin\bin;D:\cygwin\bin;D:\bin\gs\gs9.00\bin;D:\dev\webtest-3.0\bin;D:\bin\WinSCP;D:\dev\bin;D:\dev\curl-7.19.5-devel-mingw32\bin;C:\Program Files\Graphviz2.24\bin;D:\dev\unixutils\usr\local\wbin;D:\dev\unixutils\bin;D:\dev\gwt-2.2.0;D:\bin;D:\dev\gradle-0.9.2\bin;D:\dev\gant-1.6.1\bin;D:\dev\griffon-0.9.4\bin;D:\dev\grails-2.0.0\bin;D:\dev\groovy-1.8.5\bin;D:\dev\apache-tomcat-7.0.4\bin;D:\dev\apache-ant-1.7.1\bin;C:\Program Files\Java\jdk1.6.0_26\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;.’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.specification.name’ to ‘Java Platform API Specification’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.class.version’ to ‘50.0’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.management.compiler’ to ‘HotSpot Client Compiler’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘os.version’ to ‘5.1’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.home’ to ‘C:\Documents and Settings\ray’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.timezone’ to ‘America/Los_Angeles’ 18:45:02.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.awt.printerjob’ to ‘sun.awt.windows.WPrinterJob’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘file.encoding’ to ‘Cp1252’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.specification.version’ to ‘1.6’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.class.path’ to ‘D:/dev/gradle-0.9.2/lib/gradle-launcher-0.9.2.jar’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.name’ to ‘ray’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.specification.version’ to ‘1.0’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.java.command’ to ‘org.gradle.launcher.GradleMain -d test’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.home’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.arch.data.model’ to ‘32’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘user.language’ to ‘en’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.specification.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘awt.toolkit’ to ‘sun.awt.windows.WToolkit’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vm.info’ to ‘mixed mode, sharing’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.version’ to ‘1.6.0_26’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.ext.dirs’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.boot.class.path’ to ‘C:\Program Files\Java\jdk1.6.0_26\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_26\jre\lib\modules\jdk.boot.jar;C:\Program Files\Java\jdk1.6.0_26\jre\classes’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vendor’ to ‘Sun Microsystems Inc.’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘file.separator’ to ‘’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘java.vendor.url.bug’ to ‘http://java.sun.com/cgi-bin/bugreport.cgi’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.io.unicode.encoding’ to ‘UnicodeLittle’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.cpu.endian’ to ‘little’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.desktop’ to ‘windows’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘sun.cpu.isalist’ to ‘pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86’ 18:45:02.578 [INFO] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] :: loading settings :: url = jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.settings.url’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.conf.url’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.settings.dir’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.conf.dir’ to ‘jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.default.ivy.user.dir’ to ‘C:\Documents and Settings\ray.ivy2’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.home’ to ‘C:\Documents and Settings\ray.ivy2’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] no default ivy user dir defined: set to C:\Documents and Settings\ray.ivy2 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.log.modules.in.use’ to ‘false’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.resolver.default.check.modified’ to ‘false’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.default.always.check.exact.revision’ to ‘false’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.retrieve.pattern’ to ‘${ivy.lib.dir}/[artifact]-revision.[ext]’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.configurations’ to ‘’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.buildlist.ivyfilepath’ to ‘ivy.xml’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.status’ to ‘integration’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.resolve.default.type.filter’ to '’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.project.dir’ to ‘${basedir}’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.dep.file’ to ‘ivy.xml’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.settings.file’ to ‘ivysettings.xml’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.report.output.pattern’ to ‘[organisation]-[module]-[conf].[ext]’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.cache.ttl.default’ to ‘10s’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.publish.src.artifacts.pattern’ to ‘${ivy.distrib.dir}/[type]s/[artifact]-revision.[ext]’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.deliver.ivy.pattern’ to ‘${ivy.distrib.dir}/[type]s/[artifact]-revision.[ext]’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.build.artifacts.dir’ to ‘${ivy.project.dir}/build/artifacts’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.checksums’ to ‘sha1,md5’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.distrib.dir’ to ‘${ivy.project.dir}/distrib’ 18:45:02.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.lib.dir’ to ‘${ivy.project.dir}/lib’ 18:45:02.609 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] including url: jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-public.xml 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.cache.dir’ to ‘C:\Documents and Settings\ray.ivy2\cache’ 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] no default cache defined: set to C:\Documents and Settings\ray.ivy2\cache 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no namespace defined: using system 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no latest strategy defined: using default 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] including url: jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-shared.xml 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.shared.default.root’ to ‘C:\Documents and Settings\ray.ivy2/shared’ 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.shared.default.ivy.pattern’ to ‘[organisation]/[module]/[revision]/[type]s/[artifact].[ext]’ 18:45:02.625 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.shared.default.artifact.pattern’ to ‘[organisation]/[module]/[revision]/[type]s/[artifact].[ext]’ 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] including url: jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-local.xml 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.local.default.root’ to ‘C:\Documents and Settings\ray.ivy2/local’ 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.local.default.ivy.pattern’ to ‘[organisation]/[module]/[revision]/[type]s/[artifact].[ext]’ 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting ‘ivy.local.default.artifact.pattern’ to ‘[organisation]/[module]/[revision]/[type]s/[artifact].[ext]’ 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] local: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] local: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] including url: jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-main-chain.xml 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] local: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] local: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no latest strategy defined: using default 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] main: no namespace defined: using system 18:45:02.640 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] main: no latest strategy defined: using default 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] including url: jar:file:/D:/dev/gradle-0.9.2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-default-chain.xml 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no namespace defined: using system 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no latest strategy defined: using default 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] default: no namespace defined: using system 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] default: no latest strategy defined: using default 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] local: no namespace defined: using system 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] local: no latest strategy defined: using default 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no namespace defined: using system 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] public: no latest strategy defined: using default 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] main: no namespace defined: using system 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] main: no latest strategy defined: using default 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] shared: no namespace defined: using system 18:45:02.656 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] sha

You don’t need to put a JUnit Jar into the lib directory because JUnit will be found on Maven Central anyway. I recommend against using a version range (‘4.8+’) because it has little benefits and will slow things down. Currently you are adding the test source directory to the production sources, and that’s what’s causing all the problems. Instead, you need to do this:

sourceSets.main.java.srcDirs = ["src"]
sourceSets.test.java.srcDirs = ["tst"]

sourceSets.main.java.srcDirs = [“src”] sourceSets.test.java.srcDirs = [“tst”]

excellent!

works like a charm.

thanks

i am facing the same error but my build file is somewhat looks like this. please help me out

apply plugin: ‘java’ version = ‘1.0’

repositories {

mavenCentral()

maven {

url “http://repo.springsource.org/release

url “http://oss.sonatype.org/content/groups/public/

} }

sourceCompatibility = 1.6 targetCompatibility = 1.6

configurations {

cucumberRuntime {

extendsFrom testRuntime

} }

task test(overwrite: true) {

dependsOn assemble, processTestResources, compileTestJava

doLast {

javaexec {

main = “org.junit.runner.JUnitCore”

classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output

args = [‘com.erecyclingcorps.test.’ + (System.properties[“spring.profiles.active”].tokenize("_")[0]).toUpperCase() + ‘Test’]

systemProperties System.properties

}

} } dependencies {

compile ‘org.seleniumhq.selenium:selenium-java:2.32.+’

compile ‘org.apache.commons:commons-lang3:3.1’

compile ‘org.springframework:spring-context:3.2.3.RELEASE’

testCompile ‘info.cukes:cucumber-java:1.1.3’

testCompile ‘info.cukes:cucumber-junit:1.1.3’

testCompile ‘info.cukes:cucumber-spring:1.1.3’

testCompile group: ‘junit’,name:‘junit’,version: ‘4.8+’

testCompile ‘org.easytesting:fest-assert-core:2.0+’

}

Please create a new topic and explain in detail what the problem is, what exact error message you are getting, and what steps you have taken in trying to solve the problem. Please use HTML code tags for all code snippets.

it did work like a charm back then. i just added gradle to a new java 8 project. and am having the same problem as before.

it says:

D:\ray\dev\goapps\go3>gradle test :compileJava D:\ray\dev\goapps\go3\src\equipment8\ToStringTestCase.java:3: error: package org .junit does not exist import static org.junit.Assert.*;

^ i am probably doing something really siily?

i deleted all the stuff in C:\Users\ray.gradle, but no joy.

thanks

build file:

task wrapper(type: Wrapper) { gradleVersion=‘2.3’ } repositories { mavenCentral() } apply plugin: ‘java’ targetCompatibility = “1.8”

sourceCompatibility = “1.8” sourceSets.main.java.srcDirs = [“src”] sourceSets.test.java.srcDirs = [“tst”] sourceSets.main.resources.srcDirs = [“resources”] dependencies {

compile fileTree(dir: ‘lib’, includes: [’*.jar’])

testCompile group: ‘junit’,name:‘junit’,version: ‘4.11’ } version = ‘0.1’

jar {

manifest {

attributes ‘Main-Class’: ‘gui.Main’

} } apply plugin: ‘application’ mainClassName = ‘gui.Main’ // for application plugin mainClassName = ‘controller.CommandLine’ // for application plugin //apply plugin: ‘checkstyle’ //apply plugin ‘project-report’