-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
101 lines (83 loc) · 2.59 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
val javaVersion = JavaLanguageVersion.of(21)
plugins {
kotlin("jvm") version "2.0.21"
`maven-publish`
`java-library`
id("com.diffplug.spotless") version "6.25.0"
id("com.github.ben-manes.versions") version "0.51.0"
id("se.patrikerdes.use-latest-versions") version "0.2.18"
}
allprojects {
repositories {
mavenCentral()
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
}
apply(plugin = "com.diffplug.spotless")
apply(plugin = "com.github.ben-manes.versions")
apply(plugin = "se.patrikerdes.use-latest-versions")
spotless {
kotlin {
ktlint("0.50.0")
}
}
configurations.all {
resolutionStrategy {
failOnNonReproducibleResolution()
}
}
}
subprojects {
group = "no.nav.tilleggsstonader-libs"
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "maven-publish")
apply(plugin = "java-library")
kotlin {
jvmToolchain(javaVersion.asInt())
}
dependencies {
implementation(platform("org.springframework.boot:spring-boot-dependencies:3.3.5"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.assertj:assertj-core")
testImplementation("io.mockk:mockk:1.13.13")
testImplementation("ch.qos.logback:logback-core")
testImplementation("ch.qos.logback:logback-classic")
}
tasks.jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.test {
useJUnitPlatform()
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = project.name
version = project.findProperty("version")?.toString() ?: "1.0-SNAPSHOT"
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/tilleggsstonader-libs")
credentials {
username = "x-access-token"
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
if (project.hasProperty("skipLint")) {
gradle.startParameter.excludedTaskNames += "spotlessKotlinCheck"
}
kotlin.sourceSets["main"].kotlin.srcDirs("main")
kotlin.sourceSets["test"].kotlin.srcDirs("test")
sourceSets["main"].resources.srcDirs("main")
sourceSets["test"].resources.srcDirs("test")
}