-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (62 loc) · 2.4 KB
/
build.gradle
File metadata and controls
72 lines (62 loc) · 2.4 KB
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
buildscript {
ext {
springBootVersion = '1.4.2.RELEASE'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
configurations {
providedRuntime
}
dependencies {
repositories {
mavenCentral()
// maven {
// url "http://your-nexusurl.com/nexus/content/groups/public/"
// }
// maven {
// credentials {
// username nexusUsername
// password nexusPassword
// }
// url 'http://your-nexusurl.com/repositories/ng2boot-releases/'
// }
// maven {
// credentials {
// username nexusUsername
// password nexusPassword
// }
// url 'http://your-nexusurl.com/repositories/ng2boot-snapshots/'
// }
}
ext {
springBootVersion = '1.4.2.RELEASE'
jerseyVersion = "2.23.2"
}
compile("org.springframework.boot:spring-boot-starter-jersey:$springBootVersion") //jax-rs instead of spring-mvc
compile("org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion")
compile("org.hibernate:hibernate-java8:5.0.0.Final") //LocalDateTime hibernate converters
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.1") //to automatically deserialize LocalDateTimes etc.
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:$springBootVersion") //excluded to package into .war, but still able to run locally standalone
// runtime 'com.oracle.jdbc:ojdbc6:11.2.0.4' //switch with whatever database jdbc driver you require
testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
testCompile("junit:junit:4.12")
testCompile("org.assertj:assertj-core:3.2.0")
testCompile("org.mockito:mockito-core:2.0.31-beta")
testCompile("org.glassfish.jersey.core:jersey-client:$jerseyVersion")
testCompile("org.glassfish.jersey.ext:jersey-proxy-client:$jerseyVersion")
}
test {
reports {
junitXml.enabled = true
html.enabled = false
}
systemProperty "spring.profiles.active", project.findProperty("springProfile") //so you can pass a profile so springboot test runtime can use environment specific database
}