-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.gradle
65 lines (64 loc) · 2.15 KB
/
release.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
signing {
useGpgCmd()
required { gradle.taskGraph.hasTask("publish") }
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}
publishing {
publications {
create("default", MavenPublication) {
from(components["java"])
pom {
name.set(rootProject.name)
description.set("VeraId library")
url.set("https://github.com/relaycorp/veraid-jvm")
developers {
developer {
id.set("relaycorp")
name.set("Relaycorp, Inc.")
email.set("[email protected]")
}
}
licenses {
license {
name.set("Apache-2.0")
}
}
scm {
connection.set("scm:git:https://github.com/relaycorp/veraid-jvm.git")
developerConnection.set(
"scm:git:https://github.com/relaycorp/veraid-jvm.git"
)
url.set("https://github.com/relaycorp/veraid-jvm")
}
}
}
}
repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
)
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
}
}
tasks.publish {
finalizedBy("closeAndReleaseSonatypeStagingRepository")
}