-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
134 lines (120 loc) · 4.16 KB
/
build.gradle.kts
File metadata and controls
134 lines (120 loc) · 4.16 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
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.org.purejava.tweetnacl.java)
api(libs.org.json.json)
api(libs.org.apache.commons.commons.lang3)
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)
testRuntimeOnly(libs.org.junit.platform.junit.platform.launcher)
testImplementation(libs.org.slf4j.slf4j.simple)
}
group = "org.purejava"
version = "1.3.2-SNAPSHOT"
description = "A Java library to access KeePassXC via its build-in proxy."
java {
sourceCompatibility = JavaVersion.VERSION_21
withSourcesJar()
withJavadocJar()
}
val sonatypeUsername: String = System.getenv("SONATYPE_USERNAME") ?: ""
val sonatypePassword: String = System.getenv("SONATYPE_PASSWORD") ?: ""
tasks.test {
useJUnitPlatform()
filter {
includeTestsMatching("KeepassProxyAccessTest")
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("keepassxc-proxy-access")
description.set("A Java library to access KeePassXC via its build-in proxy.")
url.set("https://github.com/purejava/keepassxc-proxy-access")
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/keepassxc-proxy-access.git")
developerConnection.set("scm:git:ssh://github.com/purejava/keepassxc-proxy-access.git")
url.set("https://github.com/purejava/keepassxc-proxy-access/tree/main")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/purejava/keepassxc-proxy-access/issues")
}
}
}
}
}
centralPortal {
publishingType.set(USER_MANAGED)
username.set(sonatypeUsername)
password.set(sonatypePassword)
// Configure POM metadata
pom {
name.set("keepassxc-proxy-access")
description.set("A Java library to access KeePassXC via its build-in proxy.")
url.set("https://github.com/purejava/keepassxc-proxy-access")
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/keepassxc-proxy-access.git")
developerConnection.set("scm:git:ssh://github.com/purejava/keepassxc-proxy-access.git")
url.set("https://github.com/purejava/keepassxc-proxy-access/tree/main")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/purejava/keepassxc-proxy-access/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> {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}