-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.gradle
113 lines (96 loc) · 2.97 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
102
103
104
105
106
107
108
109
110
111
112
113
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'spring-boot'
apply plugin: 'cloudfoundry'
jar {
baseName = 'accounts-web-service'
version = appVersion
}
group = "com.wakaleo.flying-high"
install {
repositories.mavenInstaller {
pom.project {
parent {
groupId 'org.springframework.boot'
artifactId 'spring-boot-starter-parent'
version "1.1.6.RELEASE"
}
}
}
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.data:spring-data-mongodb")
compile("org.springframework.data:spring-data-rest-webmvc")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.codehaus.groovy:groovy-all:2.3.6")
compile("com.google.guava:guava:18.0")
compile project(":flights-web-service")
testCompile("org.spockframework:spock-core:0.7-groovy-2.0")
testCompile("junit:junit")
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile "org.codehaus.groovy.modules.http-builder:http-builder:0.7"
testCompile 'org.easytesting:fest-assert-core:2.0M10'
testCompile 'com.insightfullogic:lambda-behave:0.3'
}
test {
maxParallelForks 4
useJUnit()
include '**/When*.class'
exclude '**/*IT.class'
testLogging {
events "passed", "skipped", "failed"
}
}
task integrationTests(type: Test) {
if (project.hasProperty('localhost')) {
systemProperty 'mongodb.host', 'localhost'
systemProperty 'mongodb.port', '27017'
systemProperty 'mongodb.database', 'flyinghigh'
systemProperty 'mongodb.username', ''
systemProperty 'mongodb.password', ''
} else {
systemProperty 'mongodb.host', 'ds039020.mongolab.com'
systemProperty 'mongodb.port', '39020'
systemProperty 'mongodb.database', 'flyinghigh-integration'
systemProperty 'mongodb.username', 'flyinghigh'
systemProperty 'mongodb.password', 'flyinghigh'
}
include '**/*IT.class'
testLogging {
events "passed", "skipped", "failed"
}
}
integrationTests.dependsOn test
check.dependsOn integrationTests
processResources {
filter ReplaceTokens, tokens: [
"application.version": project.jar.version,
"build.number": buildNumber
]
}
if (project.hasProperty('production')) {
cloudfoundry {
space = 'production'
uri = 'http://prod-accounts.cfapps.io'
}
} else {
cloudfoundry {
space = 'development'
uri = 'http://dev-accounts.cfapps.io'
}
}
//cloudfoundry {
// target = 'https://api.run.pivotal.io'
// application = 'accounts'
// username = cfUsername
// password = cfPassword
// file = file("${jar.archivePath}")
// buildpack = 'https://github.com/cloudfoundry/java-buildpack'
// services {
// 'mongodb' {
// label = 'mongolab'
// plan = 'sandbox'
// bind = true
// }
// }
//}