-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
121 lines (100 loc) · 3.5 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val ktorVersion = "1.5.0"
val kafkaVersion = "2.4.0"
val micrometerRegistryPrometheusVersion = "1.6.2"
val junitJupiterVersion = "5.7.0"
val jacksonVersion = "2.12.0"
group = "com.github.navikt"
version = properties["version"] ?: "local-build"
plugins {
kotlin("jvm") version "1.4.21"
id("java")
id("maven-publish")
}
dependencies {
api("ch.qos.logback:logback-classic:1.2.3")
api("net.logstash.logback:logstash-logback-encoder:6.6") {
exclude("com.fasterxml.jackson.core")
}
api("io.ktor:ktor-server-netty:$ktorVersion")
api("org.apache.kafka:kafka-clients:$kafkaVersion")
api("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
api("io.ktor:ktor-metrics-micrometer:$ktorVersion")
api("io.micrometer:micrometer-registry-prometheus:$micrometerRegistryPrometheusVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testImplementation("no.nav:kafka-embedded-env:$kafkaVersion")
testImplementation("org.awaitility:awaitility:4.0.3")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
tasks.named<KotlinCompile>("compileTestKotlin") {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
showExceptions = true
showStackTraces = true
showCauses = true
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
}
}
tasks.withType<Wrapper> {
gradleVersion = "6.7.1"
}
repositories {
mavenCentral()
maven("https://dl.bintray.com/kotlin/ktor")
maven("https://packages.confluent.io/maven/")
maven("https://jitpack.io")
}
val sourcesJar by tasks.registering(Jar::class) {
classifier = "sources"
from(sourceSets.main.get().allSource)
}
val githubUser: String? by project
val githubPassword: String? by project
publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/navikt/hm-rapids-and-rivers")
credentials {
username = githubUser
password = githubPassword
}
}
}
publications {
create<MavenPublication>("mavenJava") {
pom {
name.set("rapids-rivers")
description.set("Rapids and Rivers")
url.set("https://github.com/navikt/hm-rapids-and-rivers")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
scm {
connection.set("scm:git:https://github.com/navikt/hm-rapids-and-rivers.git")
developerConnection.set("scm:git:https://github.com/navikt/hm-rapids-and-rivers.git")
url.set("https://github.com/navikt/hm-rapids-and-rivers")
}
}
from(components["java"])
artifact(sourcesJar.get())
}
}
}