-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
100 lines (82 loc) · 2.16 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
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
ext {
temas = [
'logica',
'introducao',
'oo'
]
dificuldades = [
'facil',
'medio',
'dificil'
]
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.thoughtworks.gauge:gauge-java:+'
compile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}"
compile "org.flywaydb:flyway-core"
compile "org.postgresql:postgresql:42.2.5"
}
sourceSets {
main {
java {
srcDirs = [
"$rootDir/src/java/main",
"$rootDir/src/javascript/main"
]
}
}
test {
java {
srcDirs = [
"$rootDir/src/java/test",
"$rootDir/src/javascript/test",
]
}
}
}
private def gaugeControl(Exec task, List<String> params) {
task.commandLine = ["$rootDir/gaugectl"] + params
}
task injectManifestJs(type: Exec) {
gaugeControl delegate, ["inject-manifest", "js", rootDir]
}
task injectManifestJava(type: Exec) {
gaugeControl delegate, ["inject-manifest", "java", rootDir]
}
task runJsSpecs(type: Exec) {
gaugeControl delegate, ["run", "javascript"]
}
task runJavaSpecs(type: Exec) {
gaugeControl delegate, ["run", "java"]
}
task deleteManifest(type: Exec) {
gaugeControl delegate, ["remove-manifest", rootDir]
}
task openReport(type: Exec, dependsOn: 'deleteManifest') {
gaugeControl delegate, ["open-report"]
}
task testeJava(dependsOn: 'injectManifestJava')
task testeJs(dependsOn: 'injectManifestJs')
testeJava.finalizedBy(runJavaSpecs)
runJavaSpecs.finalizedBy(openReport)
testeJs.finalizedBy(runJsSpecs)
runJsSpecs.finalizedBy(openReport)