-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
91 lines (76 loc) · 2.54 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
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "io.github.mikaojk"
version = System.getenv("NEW_VERSION") ?: "1.0.0"
val junitJupiterVersion = "5.11.3"
val kotlinVersion = "2.1.0"
val ktfmtVersion = "0.44"
plugins {
kotlin("jvm") version "2.1.0"
id("com.github.ben-manes.versions") version "0.51.0"
id("com.diffplug.spotless") version "6.25.0"
id("com.vanniktech.maven.publish") version "0.30.0"
}
repositories {
mavenCentral()
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
signAllPublications()
coordinates(group.toString(), "norwegian-social-security-number-validator", version.toString())
pom {
name.set("norwegian-organization-number-validator")
description.set("Library for validation a norwegian organization number")
url.set("https://github.com/MikAoJk/norwegian-organization-number-validator")
inceptionYear.set("2024")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("MikAoJk")
name.set("Joakim Taule Kartveit")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/MikAoJk/norwegian-organization-number-validator.git")
developerConnection.set("scm:git:https://github.com/MikAoJk/norwegian-organization-number-validator.git")
url.set("https://github.com/MikAoJk/norwegian-organization-number-validator")
}
version = System.getenv("NEW_VERSION")
}
}
tasks {
spotless {
kotlin { ktfmt(ktfmtVersion).kotlinlangStyle() }
check {
dependsOn("spotlessApply")
}
}
javadoc {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
test {
useJUnitPlatform()
testLogging {
events("skipped", "failed")
showStackTraces = true
showExceptions = true
showCauses = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
}