This repository was archived by the owner on Oct 29, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
139 lines (120 loc) · 4.17 KB
/
build.gradle.kts
File metadata and controls
139 lines (120 loc) · 4.17 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import net.thebugmc.gradle.sonatypepublisher.PublishingType.*
plugins {
id("java-library")
id("net.thebugmc.gradle.sonatype-central-portal-publisher") version "1.2.4"
id("maven-publish")
id("signing")
}
repositories {
mavenCentral()
}
dependencies {
api(libs.com.github.hypfvieh.dbus.java.core)
api(libs.com.github.hypfvieh.dbus.java.transport.native.unixsocket)
api(libs.org.slf4j.slf4j.api)
testImplementation(libs.org.junit.jupiter.junit.jupiter.api)
testImplementation(libs.org.junit.jupiter.junit.jupiter.engine)
testImplementation(libs.org.junit.jupiter.junit.jupiter)
testImplementation(libs.org.slf4j.slf4j.simple)
testRuntimeOnly(libs.org.junit.platform.junit.platform.launcher)
}
group = "org.purejava"
version = "1.6.1-SNAPSHOT"
description = "A Java library for storing secrets on linux in a KDE wallet over D-Bus, implements kwallet."
val sonatypeUsername: String = System.getenv("SONATYPE_USERNAME") ?: ""
val sonatypePassword: String = System.getenv("SONATYPE_PASSWORD") ?: ""
java {
java.sourceCompatibility = JavaVersion.VERSION_19
withSourcesJar()
withJavadocJar()
}
tasks.test {
useJUnitPlatform()
filter {
includeTestsMatching("KDEWalletTest")
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("kdewallet")
description.set("A Java library for storing secrets on linux in a KDE wallet over D-Bus, implements kwallet.")
url.set("https://github.com/purejava/kdewallet")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("purejava")
name.set("Ralph Plawetzki")
email.set("ralph@purejava.org")
}
}
scm {
connection.set("scm:git:git://github.com/purejava/kdewallet.git")
developerConnection.set("scm:git:ssh://github.com/purejava/kdewallet.git")
url.set("https://github.com/purejava/kdewallet/tree/main")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/purejava/kdewallet/issues")
}
}
}
}
}
centralPortal {
publishingType.set(USER_MANAGED)
username.set(sonatypeUsername)
password.set(sonatypePassword)
// Configure POM metadata
pom {
name.set("kdewallet")
description.set("A Java library for storing secrets on linux in a KDE wallet over D-Bus, implements kwallet.")
url.set("https://github.com/purejava/kdewallet")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("purejava")
name.set("Ralph Plawetzki")
email.set("ralph@purejava.org")
}
}
scm {
connection.set("scm:git:git://github.com/purejava/kdewallet.git")
developerConnection.set("scm:git:ssh://github.com/purejava/kdewallet.git")
url.set("https://github.com/purejava/kdewallet/tree/main")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/kdewallet/issues")
}
}
}
if (!version.toString().endsWith("-SNAPSHOT")) {
signing {
useGpgCmd()
sign(configurations.runtimeElements.get())
sign(publishing.publications["mavenJava"])
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
isFailOnError = false
if (JavaVersion.current().isJava9Compatible) {
(options as? StandardJavadocDocletOptions)?.addBooleanOption("html5", true)
}
(options as? StandardJavadocDocletOptions)?.encoding = "UTF-8"
}