forked from emilymclean/JSON-Specialiser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
78 lines (67 loc) · 1.69 KB
/
build.gradle
File metadata and controls
78 lines (67 loc) · 1.69 KB
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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
id 'jacoco'
id 'maven-publish'
}
group = 'cl.benm'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2'
testImplementation 'org.mockito:mockito-core:5.4.0'
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.0.0'
}
test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(11)
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
csv.required = true
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'cl/benm/jsons/exception/**',
'cl/benm/jsons/config/**'
])
}))
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.75
}
}
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/BenMMcLean/JSON-Specialiser")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}