@@ -149,18 +149,23 @@ task comps {
149149}
150150
151151afterEvaluate {
152+ def projectVersion = version
153+
152154 publishing {
153155 publications {
154- mavenJava(MavenPublication ) {
156+ release(MavenPublication ) {
157+ groupId group
155158 artifactId = ' dashj-scrypt-android'
156- version " $version "
157- // from components.release
158- artifact sourcesJar
159- artifact javadocJar
159+ version projectVersion
160+ from components. release
161+
160162 pom {
161163 name = ' DashJ Scrypt'
162164 description = ' DashJ Scrypt Libary for Android'
163165 url = ' https://github.com/dashpay/dashj-android'
166+
167+ // Override packaging to jar for Maven Central compatibility
168+ packaging = ' jar'
164169
165170 licenses {
166171 license {
@@ -189,51 +194,49 @@ afterEvaluate {
189194 }
190195 }
191196 }
192-
193- signing {
194- required { gradle. taskGraph. hasTask(" publish" ) }
195- sign publishing. publications. mavenJava
196- }
197- }
198-
199- jreleaser {
200- def projectVersion = version
201- project {
202- name = ' dashj-scrypt-android'
203- description = ' DashJ Scrypt Libary for Android'
204- website = ' https://github.com/dashpay/dashj-android'
205- authors = [' HashEngineering' ]
206- license = ' The Apache License, Version 2.0'
207- gitRootSearch = true
208- version = projectVersion
209- }
197+ jreleaser {
198+ project {
199+ name = ' dashj-scrypt-android'
200+ description = ' DashJ Scrypt Libary for Android'
201+ website = ' https://github.com/dashpay/dashj-android'
202+ authors = [' HashEngineering' ]
203+ license = ' The Apache License, Version 2.0'
204+ gitRootSearch = true
205+ version = projectVersion
206+ }
210207
211- signing {
212- active = ' ALWAYS'
213- armored = true
214- }
208+ signing {
209+ active = ' ALWAYS'
210+ armored = true
211+ }
215212
216- deploy {
217- maven {
218- mavenCentral {
219- sonatype {
220- active = ' ALWAYS'
221- url = ' https://central.sonatype.com/api/v1/publisher'
222- stagingRepository(" $buildDir /staging-deploy" )
213+ deploy {
214+ maven {
215+ mavenCentral {
216+ sonatype {
217+ active = ' ALWAYS'
218+ url = ' https://central.sonatype.com/api/v1/publisher'
219+ stagingRepository(" $buildDir /staging-deploy" )
220+ }
223221 }
224- }
225- nexus2 {
226- app {
227- active = ' SNAPSHOT '
228- url = ' https://central.sonatype.com/repository/maven-snapshots/'
229- snapshotUrl = ' https://central.sonatype.com/repository/maven-snapshots/ '
230- applyMavenCentralRules = true
231- snapshotSupported = true
232- closeRepository = true
233- releaseRepository = true
234- stagingRepository( " $b uildDir /staging-deploy " )
222+ nexus2 {
223+ app {
224+ active = ' SNAPSHOT '
225+ url = ' https://central.sonatype.com/repository/maven-snapshots/ '
226+ snapshotUrl = ' https://central.sonatype.com/repository/maven-snapshots/'
227+ applyMavenCentralRules = false // must be false for aar
228+ snapshotSupported = true
229+ closeRepository = true
230+ releaseRepository = true
231+ stagingRepository( " $b uildDir /staging-deploy " )
232+ }
235233 }
236234 }
237235 }
238236 }
237+ signing {
238+ required { gradle. taskGraph. hasTask(" publish" ) }
239+ sign publishing. publications. release
240+ }
239241}
242+
0 commit comments