@@ -85,69 +85,65 @@ publishing {
8585 }
8686}
8787
88- jreleaser {
89- gitRootSearch.set(true )
90-
91- project {
92- name.set(" jpasskit" )
93- description.set(" Java Library for Apple PassKit Web Service" )
94- website.set(" https://github.com/drallgood/jpasskit" )
95- license.set(" Apache-2.0" )
96- authors.set(listOf (" Patrice Brend'amour" ))
97- copyright.set(" 2012-${Calendar .getInstance().get(Calendar .YEAR )} Patrice Brend'amour" )
98- }
99-
100- release {
101- github {
102- repoOwner.set(" drallgood" )
88+ if (project == rootProject) {
89+ jreleaser {
90+ gitRootSearch.set(true )
91+
92+ project {
10393 name.set(" jpasskit" )
104- overwrite.set(true )
105- skipTag.set(true ) // We're creating the tag manually
106- changelog {
107- preset.set(" conventional-commits" )
108- skipMergeCommits.set(true )
94+ description.set(" Java Library for Apple PassKit Web Service" )
95+ website.set(" https://github.com/drallgood/jpasskit" )
96+ license.set(" Apache-2.0" )
97+ authors.set(listOf (" Patrice Brend'amour" ))
98+ }
99+
100+ release {
101+ github {
102+ repoOwner.set(" drallgood" )
103+ name.set(" jpasskit" )
104+ overwrite.set(true )
105+ skipTag.set(true ) // We're creating the tag manually
106+ changelog {
107+ preset.set(" conventional-commits" )
108+ skipMergeCommits.set(true )
109+ }
109110 }
110111 }
111- }
112-
113- signing {
114- active.set(Active .ALWAYS )
115- armored.set(true )
116- command {
117- executable.set(" gpg" )
118- args.set(listOf (" --batch" , " --yes" , " --pinentry-mode" , " loopback" ))
119- keyName.set(" 9474B9FCBDF93BEE7CC4B69B4CE3C3B7A5E5FCC2" )
112+
113+ signing {
114+ active.set(" ALWAYS" )
115+ armored.set(true )
116+ command {
117+ executable.set(" gpg" )
118+ args.set(listOf (" --batch" , " --yes" , " --pinentry-mode" , " loopback" ))
119+ keyName.set(" 9474B9FCBDF93BEE7CC4B69B4CE3C3B7A5E5FCC2" )
120+ }
121+ mode.set(" COMMAND" )
120122 }
121- mode.set(Signing .Mode .COMMAND )
122- }
123- deploy {
124- maven {
125- mavenCentral {
126- create(" release-deploy" ) {
127- active.set(Active .RELEASE )
128- url.set(" https://central.sonatype.com/api/v1/publisher" )
129- stagingRepositories.set(
130- listOf (
131- layout.buildDirectory.dir(" staging-deploy" ).get().asFile.absolutePath
132- )
133- )
134- applyMavenCentralRules.set(true )
123+
124+ deploy {
125+ maven {
126+ val stagingPaths = (listOf (project) + project.subprojects).map { p ->
127+ p.layout.buildDirectory.dir(" staging-deploy" ).get().asFile.absolutePath
135128 }
136- }
137- nexus2 {
138- create(" snapshot-deploy" ) { // Use create() for named configurations
139- active.set(Active .SNAPSHOT )
140- url.set(" https://central.sonatype.com/api/v1/publisher" )
141- snapshotUrl.set(" https://central.sonatype.com/repository/maven-snapshots" )
142- stagingRepositories.set(
143- listOf (
144- layout.buildDirectory.dir(" staging-deploy" ).get().asFile.absolutePath
145- )
146- )
147- applyMavenCentralRules.set(true )
148- closeRepository.set(true )
149- snapshotSupported.set(true )
150- releaseRepository.set(true )
129+ mavenCentral {
130+ create(" release-deploy" ) {
131+ active.set(" RELEASE" )
132+ url.set(" https://central.sonatype.com/api/v1/publisher" )
133+ stagingRepositories.set(stagingPaths)
134+ applyMavenCentralRules.set(true )
135+ }
136+ }
137+ nexus2 {
138+ create(" snapshot-deploy" ) {
139+ active.set(" SNAPSHOT" )
140+ url.set(" https://central.sonatype.com/api/v1/publisher" )
141+ snapshotUrl.set(" https://central.sonatype.com/repository/maven-snapshots" )
142+ stagingRepositories.set(stagingPaths)
143+ applyMavenCentralRules.set(true )
144+ closeRepository.set(true )
145+ snapshotSupported.set(true )
146+ }
151147 }
152148 }
153149 }
0 commit comments