-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
106 lines (92 loc) · 3.33 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
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("java-library")
kotlin("jvm") version "1.9.24"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id("maven-publish")
}
repositories {
mavenCentral()
maven("https://packages.confluent.io/maven/")
}
group = "com.github.navikt"
kotlin {
jvmToolchain(21)
}
dependencies {
implementation("de.huxhorn.sulky:de.huxhorn.sulky.ulid:8.3.0")
implementation("io.prometheus:simpleclient_common:0.16.0")
val moshiVersion = "1.15.1"
implementation("com.squareup.moshi:moshi:$moshiVersion")
implementation("com.squareup.moshi:moshi-adapters:$moshiVersion")
implementation("com.squareup.moshi:moshi-kotlin:$moshiVersion")
testImplementation(kotlin("test"))
testImplementation("org.json:json:20240303")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.9.1")
}
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}
val githubUser: String? by project
val githubPassword: String? by project
publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/navikt/dagpenger-events")
credentials {
username = githubUser
password = githubPassword
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(sourcesJar.get())
pom {
name.set("dagpenger-events")
description.set(
"""Holder definisjonen av dagpenger inntekt (brukt av [dp-inntekt] og 'packet'.
|Packet er dagpengers gamle svar på JsonMessage på [Rapid and rivers]. Brukes stort sett bare av [dp-regel*] riggen.
""".trimMargin(),
)
url.set("https://github.com/navikt/dagpenger-events")
withXml {
asNode().appendNode("packaging", "jar")
}
licenses {
license {
name.set("MIT License")
name.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
organization.set("NAV (Arbeids- og velferdsdirektoratet) - The Norwegian Labour and Welfare Administration")
organizationUrl.set("https://www.nav.no")
}
}
scm {
connection.set("scm:git:git://github.com/navikt/dagpenger-events.git")
developerConnection.set("scm:git:git://github.com/navikt/dagpenger-events.git")
url.set("https://github.com/navikt/dagpenger-events")
}
}
}
}
}
tasks.withType<KotlinCompile>().configureEach {
dependsOn("ktlintFormat")
}