Skip to content

Commit fd64aae

Browse files
committed
Configure maven publication to sonatype OSSRH
1 parent 02fd47a commit fd64aae

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

build.gradle

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
id 'maven-publish'
66
id 'signing'
77
id 'idea'
8+
id "io.github.gradle-nexus.publish-plugin" version '1.1.0'
89
}
910

1011
group = 'io.pinecone'
@@ -118,18 +119,21 @@ publishing {
118119
}
119120
}
120121
}
122+
}
123+
124+
nexusPublishing {
121125
repositories {
122-
mavenCentral {
123-
credentials {
124-
username project.findProperty('pineconeMavenCentralUsername')
125-
password project.findProperty('pineconeMavenCentralPassword')
126-
}
127-
// url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
128-
url = 'https://fake.mavenrepo.org/service/local/staging/deploy/maven2/'
126+
sonatype {
127+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
128+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
129129
}
130130
}
131131
}
132132

133133
signing {
134+
def signingKeyId = findProperty("signingKeyId")
135+
def signingKey = findProperty("signingKey")
136+
def signingPassword = findProperty("signingPassword")
137+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
134138
sign publishing.publications.pineconeClientMaven
135139
}

0 commit comments

Comments
 (0)