-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
73 lines (58 loc) · 1.88 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
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.json', name: 'json', version: '20180813'
testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version: '1.2.5'
testCompile 'info.cukes:cucumber-java:1.2.4'
testCompile 'info.cukes:cucumber-junit:1.2.4'
testCompile 'junit:junit:4.12'
}
def corsPort = 7777
def corsDirectoryPath = System.getProperty("user.dir") + '/src/test/resources/corsFiles'
def defaultPort = 8888
def demoDirectoryPath = System.getProperty("user.dir") + '/src/test/resources/demoFiles'
def testDirectoryPath = System.getProperty("user.dir") + '/src/test/resources/testFiles'
task startCorsServer(type: JavaExec) {
classpath sourceSets.main.runtimeClasspath
main = "Main"
args "-port", corsPort, "-dir", corsDirectoryPath
}
task startDemoServer(type: JavaExec) {
classpath sourceSets.main.runtimeClasspath
main = "Main"
args "-port", defaultPort, "-dir", demoDirectoryPath
}
task startTestServer(type: JavaExec) {
classpath sourceSets.main.runtimeClasspath
main = "Main"
args "-port", defaultPort, "-dir", testDirectoryPath
}
task createLogsDirectory() {
def logDir = new File(System.getProperty("user.dir") + '/logs')
logDir.mkdir()
}
task createTestDirectory() {
def testDir = testDirectoryPath
}
build.dependsOn(createTestDirectory, createLogsDirectory)
test {
systemProperty 'PORT', defaultPort
systemProperty 'TEST_DIRECTORY_PATH', testDirectoryPath
testLogging {
exceptionFormat = 'full'
events = ["passed", "failed", "skipped", "standardOut", "standardError"]
}
}
jar {
manifest {
attributes 'Main-Class': 'Main'
}
}