@@ -22,6 +22,7 @@ plugins {
2222 jacoco
2323 `maven- publish`
2424 signing
25+ alias(libs.plugins.cthingPublishing)
2526 alias(libs.plugins.cthingVersioning)
2627 alias(libs.plugins.dependencyAnalysis)
2728 alias(libs.plugins.spotbugs)
@@ -180,55 +181,26 @@ publishing {
180181 artifact(sourceJar)
181182 artifact(javadocJar)
182183
183- pom {
184- name = project.name
185- description = project.description
186- url = " https://github.com/cthing/${project.name} "
187- licenses {
188- license {
189- name = " Apache-2.0"
190- url = " https://www.apache.org/licenses/LICENSE-2.0"
191- }
192- }
193- developers {
194- developer {
195- id = " baron"
196- name = " Baron Roberts"
197- email = " baron@cthing.com"
198- organization = " C Thing Software"
199- organizationUrl = " https://www.cthing.com"
200- }
201- }
202- scm {
203- connection = " scm:git:https://github.com/cthing/${project.name} .git"
204- developerConnection = " scm:git:git@github.com:cthing/${project.name} .git"
205- url = " https://github.com/cthing/${project.name} "
206- }
207- issueManagement {
208- system = " GitHub Issues"
209- url = " https://github.com/cthing/${project.name} /issues"
210- }
211- }
184+ pom(cthingPublishing.createPomAction())
212185 }
213186 }
214187
215- val repoUrl = if ((version as ProjectVersion ).isSnapshotBuild)
216- findProperty(" cthing.nexus.snapshotsUrl" ) else findProperty(" cthing.nexus.candidatesUrl" )
188+ val repoUrl = cthingRepo.repoUrl
217189 if (repoUrl != null ) {
218190 repositories {
219191 maven {
220192 name = " CThingMaven"
221193 setUrl(repoUrl)
222194 credentials {
223- username = property( " cthing.nexus. user" ) as String
224- password = property( " cthing.nexus. password" ) as String
195+ username = cthingRepo. user
196+ password = cthingRepo. password
225197 }
226198 }
227199 }
228200 }
229201}
230202
231- if (hasProperty( " signing.keyId " ) && hasProperty( " signing.password " ) && hasProperty( " signing.secretKeyRingFile " )) {
203+ if (cthingPublishing.canSign( )) {
232204 signing {
233205 sign(publishing.publications[" jar" ])
234206 }
0 commit comments