-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (107 loc) · 3.78 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
buildscript {
ext.atomicfu_version = '0.18.0'
dependencies {
classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicfu_version"
}
}
plugins {
id 'java'
id 'jacoco'
id 'org.jmailen.kotlinter' version "3.10.0" apply false
id 'org.jetbrains.kotlin.jvm' version '1.7.0' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.0' apply false
id "com.github.ben-manes.versions" version "0.42.0" apply false
id 'com.github.kt3k.coveralls' version '2.12.0' apply false
}
allprojects {
group 'com.github.pambrose.etcd-recipes'
version '0.9.21'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jmailen.kotlinter'
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'kotlinx-atomicfu'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" }
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
}
subprojects {
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version"
implementation "io.etcd:jetcd-all:$jetcd_version"
implementation "com.google.guava:guava:$guava_version"
implementation "com.github.pambrose.common-utils:core-utils:$utils_version"
implementation "com.github.pambrose.common-utils:guava-utils:$utils_version"
implementation "io.github.microutils:kotlin-logging:$logging_version"
implementation "ch.qos.logback:logback-classic:$logback_version"
testImplementation "org.amshove.kluent:kluent:$kluent_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
afterEvaluate {
getClassDirectories().setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
excludes: ['io/etcd/recipes/examples/**'])
}))
}
}
check.dependsOn jacocoTestReport
artifacts {
archives sourcesJar
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ['-Xbackend-threads=8',
'-opt-in=kotlin.time.ExperimentalTime',
'-opt-in=kotlin.ExperimentalUnsignedTypes',
]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ['-Xbackend-threads=8',
'-opt-in=kotlin.time.ExperimentalTime',
'-opt-in=kotlin.ExperimentalUnsignedTypes',
]
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
showStandardStreams = true
}
}
kotlinter {
ignoreFailures = false
//indentSize = 2
reporters = ['checkstyle', 'plain']
experimentalRules = false
disabledRules = ["no-wildcard-imports", "indent", "final-newline", "comment-spacing", "max-line-length", "no-multi-spaces", "wrapping"]
}
}