Hi All,
I am trying to run groovy/gradle project in IntelliJ IDEA. The problem is, when run with gradle task not able to debug groovy file via IDEA.
task cucumber(dependsOn: [assemble, encryptionPropertyForTest]) << {
javaexec {
main = ‘cucumber.api.cli.Main’
classpath = configurations.cucumberRuntime
def arguments = []
if(rootProject.hasProperty(“tags”)) {
tags.tokenize().each { tag ->
arguments.add(’–tags’)
arguments.add(tag)
}
}
args = arguments + [
‘–tags’, ‘~@ignore’,
‘–format’, ‘junit:build/test-reports/all.xml’,
‘–format’, ‘html:build/test-reports/html/’,
‘–format’, ‘json:build/test-reports/cucumber-report.json’,
‘–format’, ‘pretty’,
‘–glue’, ‘src/test/resources/features’,
‘src/test/resources/features’]
systemProperties = config
} }
task encryptionPropertyForTest() << {
loadEnvironmentConfiguration()
println System.properties[‘os.name’]
if (System.properties[‘os.name’].contains(“Windows”)) {
copy(“src/test/resources/encryption/$env/document_security_windows.properties”, “document_security.properties”)
copy(“src/test/resources/encryption/$env/truststore.jks”, “truststore.jks”)
}
else {
copy(“src/test/resources/encryption/$env/document_security.properties”, “document_security.properties”)
println “Copied unix 1”
copy(“src/test/resources/encryption/$env/truststore.jks”, “truststore.jks”)
} }