-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
132 lines (110 loc) · 3.98 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
verifierVersion = '1.2.1.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:${verifierVersion}"
classpath("gradle.plugin.com.boxfuse.client:flyway-release:4.2.0")
}
}
plugins {
id "org.flywaydb.flyway" version "5.1.4"
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'spring-cloud-contract'
apply plugin: 'maven-publish'
group = 'cc.msbootcamp'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url "https://repo.spring.io/milestone" }
}
ext {
springCloudVersion = 'Greenwich.M3'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-starter-parent:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
afterSuite { desc, result ->
if (!desc.parent) {
def output = " Result: ${result.resultType} " +
"(${result.testCount} Tests, " +
"${result.successfulTestCount} Successes, " +
"${result.failedTestCount} Failures, " +
"${result.skippedTestCount} Skipped) "
println('\n' + ('-' * output.length()) + '\n' + output + '\n' + ('-' * output.length()))
}
}
}
}
def JUNIT5_API_VERSION = '5.3.0'
def JUNIT5_PLATFORM_VERSION = '1.3.0'
dependencies {
runtimeOnly('org.flywaydb:flyway-core:5.1.4')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile('org.springframework.cloud:spring-cloud-starter-consul-discovery')
compile('org.springframework.cloud:spring-cloud-starter-openfeign')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-redis')
compile('mysql:mysql-connector-java')
compile('redis.clients:jedis:2.9.0')
compile('org.projectlombok:lombok:1.16.14')
compile('io.jsonwebtoken:jjwt:0.7.0')
compile('net.logstash.logback:logstash-logback-encoder:4.9')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
testCompile('com.h2database:h2:1.4.192')
testCompile ('org.springframework.cloud:spring-cloud-starter-contract-verifier')
testCompile ("org.junit.jupiter:junit-jupiter-api:${JUNIT5_API_VERSION}")
testCompile ("org.junit.jupiter:junit-jupiter-engine:${JUNIT5_API_VERSION}")
testCompile ("org.junit.jupiter:junit-jupiter-params:${JUNIT5_API_VERSION}")
testCompile ("org.junit.platform:junit-platform-launcher:${JUNIT5_PLATFORM_VERSION}")
testCompile ('org.assertj:assertj-core:3.10.0')
testCompile ('org.mockito:mockito-junit-jupiter:2.17.0')
}
contracts {
packageWithBaseClasses = 'com.thoughtworks.mstorderservice.contract'
}
flyway {
url = 'jdbc:mysql://127.0.0.1/msb_goods'
user = 'root'
password = 'dev'
}
publishing {
publications {
stubs(MavenPublication) {
groupId 'com.thoughtworks'
artifactId "mst-goods-service"
version '0.0.1'
artifact verifierStubsJar
}
}
repositories {
maven {
credentials {
username "admin"
password "admin123"
}
url = "http://10.202.129.3:8081/repository/msb-maven/"
}
}
}