-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
137 lines (115 loc) · 3.06 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'io.gitlab.arturbosch.detekt' version '1.0.0'
id 'com.jfrog.bintray' version '1.7.3'
id 'net.researchgate.release' version '2.6.0'
}
group 'io.honeycomb'
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "com.beust:klaxon:$klaxon_version"
implementation "com.github.kittinunf.fuel:fuel:$fuel_version"
implementation 'ch.qos.logback:logback-classic:1.1.2'
implementation 'io.github.microutils:kotlin-logging:1.5.4'
testImplementation 'io.kotlintest:kotlintest-runner-junit5:3.4.0'
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
test {
useJUnitPlatform()
// Always run tests, even when nothing changed.
dependsOn 'cleanTest'
}
apply from: 'gradle/integration-tests.gradle'
detekt {
filters = ".*test.*,.*/resources/.*,.*/tmp/.*"
config = files("$projectDir/config/detekt/detekt.yml")
reports {
xml {
enabled = true
}
html {
enabled = false
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mavenJava']
pkg {
repo = 'maven'
name = project.name
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/imavroukakis/libhoney-kotlin.git'
version {
name = project.version
released = new Date()
}
}
}
task sourcesJar(type: Jar, dependsOn: project.classes) {
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: project.javadoc) {
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.bintray.pkg.name
from components.java
artifact sourcesJar {
classifier = 'sources'
}
artifact javadocJar {
classifier = 'javadoc'
}
}
}
}
jacocoTestReport {
reports {
html.enabled = false
xml.enabled = false
csv.enabled = false
}
}
task jacocoMerge(type: JacocoMerge) {
dependsOn jacocoTestReport
executionData([test, integrationTest])
}
task coverageReport(type: JacocoReport) {
sourceDirectories.from = sourceSets.main.kotlin.srcDirs
classDirectories.from = sourceSets.main.output.classesDirs
executionData jacocoMerge.destinationFile
dependsOn jacocoTestReport, jacocoMerge
reports {
html.enabled = false
xml.enabled = true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
csv.enabled = false
}
}
afterReleaseBuild.dependsOn bintrayUpload