forked from karatelabs/karate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (93 loc) · 3.59 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
buildscript {
ext {
springBootVersion = '1.5.3.RELEASE'
springVersion = '4.3.8.RELEASE'
gradleVersionProperty = '4.1'
karateVersion = '1.5.0.RC1'
masterThoughtVersion = '3.8.0'
activeMqVersion = '5.15.2'
}
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'karate-demo'
version = karateVersion
}
bootRun {
systemProperties = System.properties
}
// In this section you declare where to find the dependencies of your project
repositories {
mavenLocal()
mavenCentral()
maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
}
sourceSets {
test {
java {
// Excluding UIRunner files as these require the javafx libraries
// which are not shipped with OpenJDK. These UIRunner classes are
// classes that allow developers to run/debug karate tests via a UI
// and as such are not required for headless runs on jenkins server
// but can run happily via IDE of the developer without needed to be
// compiled by gradle.
srcDir file('src/test/java')
exclude '**/*UiRunner*.java'
}
resources {
// Using recommended karate project layout where karate feature files
// and associated javascript resources sit in same /test/java folders
// as their java counterparts.
srcDir file('src/test/java')
exclude '**/*.java'
}
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-security'
compile 'org.springframework:spring-jdbc:' + springVersion
compile 'org.springframework:spring-websocket:' + springVersion
compile 'com.github.java-json-tools:json-schema-validator:2.2.8'
compile 'commons-io:commons-io:2.5'
runtime 'com.h2database:h2:1.4.196'
testImplementation 'junit:junit'
testImplementation 'io.karatelabs:karate-junit5:' + karateVersion
testImplementation 'org.apache.activemq:activemq-broker:' + activeMqVersion
testImplementation 'org.apache.activemq:activemq-client:' + activeMqVersion
testImplementation 'org.apache.activemq:activemq-kahadb-store:' + activeMqVersion
testImplementation 'org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1'
testImplementation 'net.masterthought:cucumber-reporting:' + masterThoughtVersion
}
test {
// When running the test task, only run the base Test class which runs all cucumber
// tests in parallel.
include '**/*DemoTestParallel*'
// Pull karate options into the runtime
systemProperty "karate.options", System.properties.getProperty("karate.options")
// Pull karate options into the JVM
systemProperty "karate.env", System.properties.getProperty("karate.env")
// Ensure tests are always run
outputs.upToDateWhen { false }
// attach debugger
if (System.getProperty('debug', 'false') == 'true') {
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
}
}
wrapper {
gradleVersion = gradleVersionProperty
}