-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
98 lines (89 loc) · 2.46 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
import org.jreleaser.model.Active
plugins {
kotlin("jvm") version "2.1.0"
id("org.jreleaser") version "1.16.0"
`java-library`
`maven-publish`
signing
}
group = "dev.vicart"
version = "1.0.3"
repositories {
mavenCentral()
}
dependencies {
implementation("commons-codec:commons-codec:1.17.2")
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(11)
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set("kotp")
description.set("Kotlin library for generating and verifying OTP codes")
url.set("https://github.com/xolider/kotp")
developers {
developer {
id.set("xolider")
name.set("Clément Vicart")
}
}
licenses {
license {
name.set("Apache-2.0 license")
url.set("https://raw.githubusercontent.com/xolider/kotp/refs/heads/main/LICENSE")
}
}
scm {
url.set("https://github.com/xolider/kotp")
connection.set("scm:git:git://github.com/xolider/kotp.git")
}
}
}
}
repositories {
maven {
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
}
}
signing {
useInMemoryPgpKeys(file("privkey.asc").readText(), findProperty("sign.passphrase")?.toString())
sign(publishing.publications["maven"])
}
jreleaser {
project {
description.set("Kotlin library for generating and verifying OTP codes")
copyright.set("© 2025")
}
deploy {
maven {
mavenCentral {
create("sonatype") {
sign.set(false)
active.set(Active.RELEASE)
url.set("https://central.sonatype.com/api/v1/publisher")
stagingRepository("build/staging-deploy")
username.set(findProperty("sonatype.username")?.toString())
password.set(findProperty("sonatype.password")?.toString())
}
}
}
}
release {
github {
token.set(findProperty("github.token")?.toString())
}
}
}