-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Gradle
Peter Thomas edited this page Sep 1, 2019
·
15 revisions
Here is a simple build.gradle
for Karate and JUnit 5. Please also refer to the main README.
plugins {
id 'java'
}
ext {
karateVersion = '1.0.0'
}
dependencies {
testCompile "com.intuit.karate:karate-junit5:${karateVersion}"
testCompile "com.intuit.karate:karate-apache:${karateVersion}"
}
sourceSets {
test {
resources {
srcDir file('src/test/java')
exclude '**/*.java'
}
}
}
test {
useJUnitPlatform()
systemProperty "karate.options", System.properties.getProperty("karate.options")
systemProperty "karate.env", System.properties.getProperty("karate.env")
outputs.upToDateWhen { false }
}
repositories {
// mavenCentral()
mavenLocal()
}
task karateDebug(type: JavaExec) {
classpath = sourceSets.test.runtimeClasspath
main = 'com.intuit.karate.cli.Main'
}
The optional karate
task makes it easier to connect tools such as the Visual Studio Code IDE and use the dedicated Karate extension.
For example, to start the Karate Debug Server:
gradle karate --args='-d'