-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
138 lines (115 loc) · 4.39 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
133
134
135
136
137
138
buildscript {
ext {
kotlinVersion = '1.5.0'
springBootVersion = '2.4.5'
jacksonVersion = '2.12.3'
swaggerVersion = '3.0.0'
exposedVersion = '0.17.13'
arrowVersion = '0.12.1'
jwkSetVersion = '5.1'
auth0Version = '3.14.0'
flywayVersion = '7.8.2'
junitVersion = '5.7.1'
mockkVersion = '1.11.0'
springMockkVersion = '3.0.1'
striktVersion = '0.31.0'
detektVersion = '1.16.0'
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath "com.github.ben-manes:gradle-versions-plugin:0.38.0"
// Verify pacts from gradle
classpath 'au.com.dius:pact-jvm-provider-gradle_2.12:3.6.15'
// Linter
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${detektVersion}"
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'au.com.dius.pact'
apply plugin: 'io.gitlab.arturbosch.detekt'
group = 'com.hceris'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.data:spring-data-commons'
implementation 'mysql:mysql-connector-java'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${jacksonVersion}"
implementation "org.jetbrains.exposed:exposed:$exposedVersion"
implementation "org.jetbrains.exposed:spring-transaction:$exposedVersion"
implementation "org.flywaydb:flyway-core:$flywayVersion"
implementation("com.nimbusds:nimbus-jwkset-loader:$jwkSetVersion")
implementation("com.auth0:java-jwt:$auth0Version")
implementation("io.arrow-kt:arrow-core:$arrowVersion")
implementation("io.arrow-kt:arrow-fx:$arrowVersion")
implementation "io.springfox:springfox-swagger2:$swaggerVersion"
implementation "io.springfox:springfox-swagger-ui:$swaggerVersion"
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation "io.strikt:strikt-core:$striktVersion"
testImplementation "io.mockk:mockk:${mockkVersion}"
testImplementation "com.ninja-squad:springmockk:${springMockkVersion}"
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
}
}
test {
useJUnitPlatform()
dependsOn 'cleanTest'
testLogging {
events "passed", "skipped", "failed"
}
}
pact {
serviceProviders {
api {
port = 4003
hasPactWith('cookery2-frontend') {
pactFile = url('https://raw.githubusercontent.com/sirech/cookery2-frontend/master/pacts/frontend-backend.json')
// pactSource = file('../cookery2-frontend/pacts/frontend-backend.json')
stateChangeUrl = url("http://localhost:$port/pact")
}
}
}
}
detekt {
toolVersion = "${detektVersion}"
input = files("src/main/kotlin", "src/test/kotlin")
config = files("detekt-config.yml")
}