-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
92 lines (77 loc) · 2.07 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
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
mavenCentral()
maven {
url 'http://dl.bintray.com/kotlin/kotlin-eap'
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'net.saliman:gradle-cobertura-plugin:2.0.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1'
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
id 'net.saliman.cobertura' version '2.4.0'
id 'com.github.kt3k.coveralls' version '2.8.1'
}
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply plugin: 'cobertura'
apply plugin: 'com.github.kt3k.coveralls'
kotlin_version = '1.2.31'
jacoco {
toolVersion = '0.7.9'
}
cobertura.coverageFormats = ['html', 'xml']
cobertura.coverageSourceDirs = ['src/main/kotlin']
repositories {
mavenCentral()
maven {
url 'http://dl.bintray.com/kotlin/kotlin-eap'
}
}
jacocoTestReport {
reports {
xml.enabled true
}
}
coveralls {
sourceDirs = files(sourceSets.main.allSource.srcDirs).files.absolutePath
jacocoReportPath = "${buildDir}/reports/jacoco/test/jacocoRootReport.xml"
}
task jacocoRootReport(type: JacocoReport) {
dependsOn = subprojects.test
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = files(sourceSets.main.output)
executionData = files(jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
xml.destination = "${buildDir}/reports/jacoco/test/jacocoRootReport.xml"
}
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
test {
testLogging {
events "passed", "skipped", "failed"
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}