-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
123 lines (104 loc) · 3.54 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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.4.1"
classpath "gradle.plugin.com.heroku.sdk.heroku-gradle:heroku-gradle:2.0.0"
classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0"
}
}
apply plugin: "kotlin"
apply plugin: "application"
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "jacoco"
apply plugin: "com.heroku.sdk.heroku-gradle"
apply plugin: "com.github.johnrengelman.shadow"
description "A simple authentication micro-service"
group "com.turnierverwaltung_api_auth"
version "1.0.0"
mainClassName = "io.ktor.server.netty.EngineMain"
sourceSets {
main.kotlin.srcDirs = main.java.srcDirs = ["src"]
test.kotlin.srcDirs = test.java.srcDirs = ["test"]
main.resources.srcDirs = ["resources"]
test.resources.srcDirs = ["testresources"]
}
repositories {
mavenLocal()
jcenter()
maven { url "https://kotlin.bintray.com/ktor" }
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://jitpack.io" }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "ch.qos.logback:logback-classic:$logback_version"
implementation "io.ktor:ktor-server-core:$ktor_version"
implementation "io.ktor:ktor-jackson:$ktor_version"
implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "io.ktor:ktor-client-core-jvm:$ktor_version"
implementation "io.ktor:ktor-client-json-jvm:$ktor_version"
implementation "io.ktor:ktor-client-gson:$ktor_version"
implementation "io.ktor:ktor-client-logging-jvm:$ktor_version"
implementation "io.ktor:ktor-auth-jwt:$ktor_version"
implementation "com.github.papsign:Ktor-OpenAPI-Generator:-SNAPSHOT"
implementation "org.mindrot:jbcrypt:0.4"
implementation "com.auth0:java-jwt:3.12.1"
//environment variables
implementation "io.github.cdimascio:dotenv-kotlin:6.2.2"
//database
implementation "org.jetbrains.exposed:exposed:0.17.7"
implementation "com.zaxxer:HikariCP:3.4.5"
implementation "org.postgresql:postgresql:42.2.1"
//testing
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation "io.mockk:mockk:1.10.5"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junit_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit5"
}
jar {
manifest {
attributes 'Main-Class': 'src'
}
from {
(configurations.compile).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
useJUnitPlatform()
}
jacoco {
toolVersion = "0.8.6"
}
task stage(dependsOn: ['clean', 'installDist'])
jacocoTestReport {
group = "Reporting"
description = "Generate Jacoco coverage reports."
dependsOn jacocoTestCoverageVerification
reports {
html.enabled true
xml.enabled true
csv.enabled true
html.destination file("${buildDir}/reports/jacoco/")
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.0
}
}
}
}