-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
81 lines (68 loc) · 1.85 KB
/
build.gradle.kts
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
import java.net.URI
plugins {
kotlin("jvm") version "2.0.21"
`maven-publish`
jacoco
}
group = "com.github.ralfstuckert"
version = "0.1.1-SNAPSHOT"
repositories {
maven {
url = uri("https://maven.pkg.github.com/ralfstuckert/pdftools")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USER") ?: ""
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
mavenCentral()
}
dependencies {
implementation("org.jetbrains:markdown:0.7.3")
implementation("com.github.librepdf:openpdf:2.0.3")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.9.1")
testImplementation("com.github.ralfstuckert:pdftools:0.4.0")
}
kotlin {
jvmToolchain(17)
}
tasks.withType<Test> {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
val jacocoExclude =
listOf("**/Main.kt")
tasks.withType<JacocoReport> {
reports {
xml.required.set(true)
csv.required.set(false)
html.required.set(false)
}
classDirectories.setFrom(
classDirectories.files.map {
fileTree(it).matching {
exclude(jacocoExclude)
}
},
)
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = group as String
artifactId = rootProject.name
version = version
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = URI("https://maven.pkg.github.com/ralfstuckert/openpdf-markdown")
credentials {
username = System.getenv("USERNAME")
password = System.getenv("TOKEN")
}
}
}
}