-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
81 lines (69 loc) · 2.46 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
import org.apache.tools.ant.filters.*
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/libs-release" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.1.5.RELEASE"
classpath "ch.kk7:gradle-spawn-plugin:1.0.20180924200750"
classpath 'com.netflix.nebula:nebula-release-plugin:4.2.0'
}
}
apply plugin: 'groovy'
apply plugin: 'spring-boot'
apply plugin: "ch.kk7.spawn"
apply plugin: 'nebula.nebula-release'
repositories {
mavenCentral()
jcenter()
maven { url 'http://repo.spring.io/release' }
}
dependencies {
compile "org.codehaus.groovy:groovy-all:2.4.19"
compile "org.codehaus.gpars:gpars:1.2.1"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-data-mongodb"
compile "org.springframework.boot:spring-boot-starter-social-twitter"
compile "org.mongodb:mongo-java-driver:3.2.2"
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'junit:junit:4.11'
testCompile 'cglib:cglib-nodep:3.1'
testCompile 'org.objenesis:objenesis:2.1'
testCompile 'info.cukes:cucumber-junit:1.1.8'
testCompile 'info.cukes:cucumber-groovy:1.1.8'
testCompile 'com.github.groovy-wslite:groovy-wslite:1.1.2'
}
test.testLogging.exceptionFormat = 'full'
configurations {
funtestCompile.extendsFrom testCompile
funtestRuntime.extendsFrom testRuntime
}
sourceSets {
funtest {
groovy.srcDir file("src/funtest/groovy")
resources.srcDir file("src/funtest/resources")
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.funtestCompile
runtimeClasspath = output + compileClasspath + configurations.funtestRuntime
}
}
task startService(type: SpawnTask) {
dependsOn assemble
command "java -Djava.security.egd=file:/dev/./urandom -jar build/libs/application.jar"
waitFor "Started Application"
waitForTimeout 30000
}
task stopService(type: KillTask) {
kills startService
}
task functionalTest(type: Test) {
dependsOn startService
testClassesDir = sourceSets.funtest.output.classesDir
classpath = sourceSets.funtest.runtimeClasspath
finalizedBy stopService
}
jar.archiveName = "application.jar"
check.dependsOn functionalTest