-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
109 lines (97 loc) · 3.13 KB
/
build.gradle
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
plugins {
id 'java-library'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
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
testImplementation libs.org.slf4j.slf4j.simple
}
group = 'org.purejava'
version = '1.2.8-SNAPSHOT'
description = 'A Java library to access KeePassXC via its build-in proxy.'
java.sourceCompatibility = JavaVersion.VERSION_17
def sonatypeUsername = System.getenv("SONATYPE_USERNAME") ?: ''
def sonatypePassword = System.getenv("SONATYPE_PASSWORD") ?: ''
java {
withSourcesJar()
withJavadocJar()
}
test {
useJUnitPlatform()
filter {
includeTestsMatching "KeepassProxyAccessTest"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'keepassxc-proxy-access'
description = 'A Java library to access KeePassXC via its build-in proxy.'
url = 'https://github.com/purejava/keepassxc-proxy-access'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'purejava'
name = 'Ralph Plawetzki'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/purejava/keepassxc-proxy-access.git'
developerConnection = 'scm:git:ssh://github.com/purejava/keepassxc-proxy-access.git'
url = 'https://github.com/purejava/keepassxc-proxy-access/tree/main'
}
issueManagement {
system = 'GitHub Issues'
url = 'https://github.com/purejava/keepassxc-proxy-access/issues'
}
}
}
}
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = sonatypeUsername
password = sonatypePassword
}
}
}
if (!version.toString().endsWith("-SNAPSHOT")) {
signing {
useGpgCmd()
sign configurations.runtimeElements
sign publishing.publications.mavenJava
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}