File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 22
22
arguments : publishToSonatype closeAndReleaseSonatypeStagingRepository
23
23
env :
24
24
MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
25
- MAVEN_CENTRAL_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
25
+ MAVEN_CENTRAL_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
26
+ MAVEN_GPG_PRIVATE_KEY : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
27
+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ if(hasProperty('target') && target == 'android') {
86
86
87
87
apply plugin : ' java'
88
88
apply plugin : ' maven-publish'
89
+ apply plugin : ' signing'
89
90
90
91
sourceCompatibility = JavaVersion . VERSION_11
91
92
targetCompatibility = JavaVersion . VERSION_11
@@ -104,11 +105,40 @@ if(hasProperty('target') && target == 'android') {
104
105
pom {
105
106
name = ' Unit Java SDK'
106
107
description = " This library provides a Java SDK to Unit's API."
108
+ url = ' https://github.com/unit-finance/unit-openapi-java-sdk'
109
+ licenses {
110
+ license {
111
+ name = ' Mozilla Public License Version 2.0'
112
+ url = ' https://www.mozilla.org/MPL/2.0/'
113
+ distribution = ' repo'
114
+ }
115
+ }
116
+ scm {
117
+ connection = ' scm:git:git://github.com/unit-finance/unit-openapi-java-sdk.git'
118
+ developerConnection
= ' scm:git:ssh://[email protected] :unit-finance/unit-openapi-java-sdk.git'
119
+ url = ' https://github.com/unit-finance/unit-openapi-java-sdk'
120
+ }
121
+ developers {
122
+ developer {
123
+ name = ' Unit'
124
+ organization = ' Unit Finance'
125
+ organizationUrl = ' https://unit.co'
126
+ }
127
+ }
107
128
}
108
129
}
109
130
}
110
131
}
111
132
133
+ signing {
134
+ def signingKey = System . getenv(" MAVEN_GPG_PRIVATE_KEY" )
135
+ def signingPassphrase = System . getenv(" MAVEN_GPG_PASSPHRASE" )
136
+ if (signingKey && signingPassphrase) {
137
+ useInMemoryPgpKeys(signingKey, signingPassphrase)
138
+ sign publishing. publications. maven
139
+ }
140
+ }
141
+
112
142
nexusPublishing {
113
143
repositories {
114
144
sonatype {
You can’t perform that action at this time.
0 commit comments