Skip to content

Commit 1280716

Browse files
committed
add nexus
1 parent 3327cce commit 1280716

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

build.gradle

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ publishing {
118118
pom {
119119
name = 'h3'
120120
url = 'https://github.com/uber/h3-java'
121+
description = project.description
121122
licenses {
122123
license {
123124
name = 'Apache License, Version 2.0'
@@ -136,6 +137,7 @@ publishing {
136137
}
137138
developers {
138139
developer {
140+
id = 'isaacbrodsky'
139141
name = 'Isaac Brodsky'
140142
141143
organization = 'Uber Technologies, Inc.'
@@ -145,6 +147,7 @@ publishing {
145147
}
146148
}
147149
}
150+
148151
// repositories {
149152
// maven {
150153
// def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
@@ -159,5 +162,24 @@ publishing {
159162
}
160163

161164
signing {
162-
sign publishing.publications.mavenJava
163-
}
165+
// Use in-memory PGP signing keys from environment variables
166+
useInMemoryPgpKeys(
167+
System.getenv("SIGNING_KEY_ID"), // PGP key ID (short format) – optional, can be null
168+
System.getenv("SIGNING_KEY"), // PGP secret key (ASCII-armored, e.g. base64-encoded)
169+
System.getenv("SIGNING_PASSWORD") // PGP key passphrase
170+
)
171+
sign(publishing.publications) // Sign all publications
172+
}
173+
174+
nexusPublishing {
175+
repositories {
176+
sonatype {
177+
stagingProfileId.set(System.getenv("OSSRH_STAGING_PROFILE_ID"))
178+
username.set(System.getenv("OSSRH_USERNAME"))
179+
password.set(System.getenv("OSSRH_PASSWORD"))
180+
// For newer Sonatype accounts (after Feb 2021) use "s01.oss.sonatype.org":
181+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
182+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
183+
}
184+
}
185+
}

0 commit comments

Comments
 (0)