groovy - How to use gradle file tree in groovyTestcase -


i migrating project ant gradle. want write simple test case using groovetest framework. trying use gradle project.filetree interface in groovytestcase, how ever not able resolve it. same piece of code works in "test" task in build.gradle.

here simple test case like.

import org.gradle.api.project import org.gradle.api.file.filetree class  installscripttest extends groovytestcase {          void testcounnt(){             def tree = project.filetree("${project.projectdir}"){                 include '**/install*.sh'             }          }  } 

i following error when run gradle build. groovy.lang.missingpropertyexception: no such property: project class: installscripttest

i have added gradleapi dependency in build.gradle file below.

dependencies {     testcompile 'org.codehaus.groovy:groovy-test:2.4.3'        testcompile 'junit:junit:4.12'     testcompile gradleapi() } 


Comments

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -