How can I change the glue
path for a Gradle+Cucumber project?
This is the relevant part of a build.gradle
file:
task cucumber() {
dependsOn assemble, compileTestJava
doLast{
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', '--glue', 'gradle.cucumber', 'src/main/java/features']
}
}
}
When I run the >gradle cucumber
from the command line, I get notified scenarios are not defined, because glue file is not in the /main
folder, rather in /main/java/stepmethods
.
How do I tell that to Gradle?