plugins { id 'java' } repositories { mavenCentral() } dependencies { implementation 'org.codehaus.groovy:groovy:3.0.8' testImplementation 'io.cucumber:cucumber-java:7.21.1' testImplementation 'io.cucumber:cucumber-junit:7.21.1' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3' testImplementation 'org.junit.vintage:junit-vintage-engine:5.9.3' } group = 'com.gildedrose' version = '0.0.1-SNAPSHOT' sourceCompatibility = '21' test { useJUnitPlatform() } configurations { cucumberRuntime { extendsFrom testImplementation } } task texttest(type: JavaExec) { main = "com.gildedrose.TexttestFixture" classpath = sourceSets.test.runtimeClasspath args "30" } task cucumber() { dependsOn assemble, testClasses doLast { javaexec { main = "io.cucumber.core.cli.Main" classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output args = [ '--plugin', 'pretty', '--plugin', 'html:target/cucumber-report.html', '--glue', 'com.gildedrose', 'src/test/resources'] } } }