-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (74 loc) · 1.94 KB
/
Copy pathbuild.gradle
File metadata and controls
86 lines (74 loc) · 1.94 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
defaultTasks 'clean', 'build'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'spring-boot-microservice-blueprint'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'org.slf4j:slf4j-api:1.7.13'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
/* Database Drivers -- h2 used by default. See README for MySql/Postgres usage */
compile 'com.h2database:h2'
// compile 'mysql:mysql-connector-java'
// compile 'org.postgresql:postgresql'
testCompile 'org.testng:testng:6.9.9'
testCompile ("org.springframework.boot:spring-boot-starter-test") {
exclude group: 'junit'
}
testCompile "org.mockito:mockito-all:1.9.5"
testCompile "com.jayway.jsonpath:json-path:2.0.0"
testRuntime 'com.h2database:h2'
}
// Copies files to build/docker so that 'docker build -t spring-boot-microservice-blueprint build/docker/' can be used to build image
task docker() {
ext {
buildDocker = "${buildDir}/docker"
}
doLast {
copy {
from jar
into buildDocker
rename {
"${project.name}.jar"
}
}
copy {
from "${projectDir}/src/docker/"
include "*"
into buildDocker
}
}
doLast {
copy {
from "${projectDir}/src/main/resources/application.properties"
into "${buildDir}/template"
rename {
"application.properties"
}
}
}
}
test {
useTestNG()
testLogging {
events 'passed', 'skipped', 'failed'
showStandardStreams false
}
}