-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
104 lines (91 loc) · 3.28 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
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
val junitJupiterVersion = "5.11.3"
val mockkVersion = "1.13.13"
val jacksonVersion = "2.18.1"
val testcontainersVersion = "1.20.4"
val kotlinxCoroutinesVersion = "1.9.0"
plugins {
kotlin("jvm") version "2.0.21" apply false
`maven-publish`
}
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.gradle.maven-publish")
ext.set("testcontainersVersion", testcontainersVersion)
val api by configurations
val testImplementation by configurations
val testRuntimeOnly by configurations
dependencies {
constraints {
api("com.fasterxml.jackson:jackson-bom:$jacksonVersion") {
because("Alle moduler skal bruke samme versjon av jackson")
}
api("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion") {
because("Alle moduler skal bruke samme versjon av jackson")
}
api("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") {
because("Alle moduler skal bruke samme versjon av jackson")
}
api("io.mockk:mockk:$mockkVersion") {
because("Alle moduler skal bruke samme versjon av mockk")
}
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$kotlinxCoroutinesVersion") {
because("Alle moduler skal bruke samme versjon av coroutines")
}
}
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
configure<KotlinJvmProjectExtension> {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("21"))
}
}
configure<JavaPluginExtension> {
withSourcesJar()
}
configure<PublishingExtension> {
publications {
create<MavenPublication>("maven") {
from(components["java"])
groupId = "com.github.navikt.tbd-libs"
artifactId = project.name
version = "${[email protected]}"
}
}
repositories {
maven {
url = uri("https://maven.pkg.github.com/navikt/tbd-libs")
credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_PASSWORD")
}
}
}
}
tasks {
withType<Jar> {
manifest {
attributes(mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
))
}
}
withType<Test> {
useJUnitPlatform()
testLogging {
events("skipped", "failed")
}
systemProperty("junit.jupiter.execution.parallel.enabled", "true")
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
systemProperty("junit.jupiter.execution.parallel.config.strategy", "fixed")
systemProperty("junit.jupiter.execution.parallel.config.fixed.parallelism", "8")
}
}
}