-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
79 lines (63 loc) · 1.81 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
group 'io.github.dszopa'
version '0.0.0'
buildscript {
ext.kotlin_version = '1.2.0'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'jacoco'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
// Java
compile "com.sparkjava:spark-core:2.6.0"
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.6.1'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.6'
compile group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.1'
// TODO: remove httpclient & replace implementation with fluent
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
compile 'org.apache.httpcomponents:fluent-hc:4.5.4'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
// Java Test
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile "org.mockito:mockito-core:2.12.0"
testCompile group: 'uk.org.lidalia', name: 'slf4j-test', version: '1.2.0'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task wrapper(type: Wrapper) {
gradleVersion = "4.0.1"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = false
}
}
check.dependsOn jacocoTestReport
jar {
// Keep jar clean:
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
from {
(configurations.runtime).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Main-Class': 'App'
}
}