@@ -21,6 +21,7 @@ plugins {
2121 checkstyle
2222 `maven- publish`
2323 signing
24+ alias(libs.plugins.cthingPublishing)
2425 alias(libs.plugins.cthingVersioning)
2526 alias(libs.plugins.dependencyAnalysis)
2627 alias(libs.plugins.spotbugs)
@@ -139,55 +140,26 @@ publishing {
139140 artifact(sourceJar)
140141 artifact(javadocJar)
141142
142- pom {
143- name = project.name
144- description = project.description
145- url = " https://github.com/cthing/${project.name} "
146- licenses {
147- license {
148- name = " Apache-2.0"
149- url = " https://www.apache.org/licenses/LICENSE-2.0"
150- }
151- }
152- developers {
153- developer {
154- id = " baron"
155- name = " Baron Roberts"
156- 157- organization = " C Thing Software"
158- organizationUrl = " https://www.cthing.com"
159- }
160- }
161- scm {
162- connection = " scm:git:https://github.com/cthing/${project.name} .git"
163- developerConnection
= " scm:git:[email protected] :cthing/${project.name} .git" 164- url = " https://github.com/cthing/${project.name} "
165- }
166- issueManagement {
167- system = " GitHub Issues"
168- url = " https://github.com/cthing/${project.name} /issues"
169- }
170- }
143+ pom(cthingPublishing.createPomAction())
171144 }
172145 }
173146
174- val repoUrl = if ((version as ProjectVersion ).isSnapshotBuild)
175- findProperty(" cthing.nexus.snapshotsUrl" ) else findProperty(" cthing.nexus.candidatesUrl" )
147+ val repoUrl = cthingRepo.repoUrl
176148 if (repoUrl != null ) {
177149 repositories {
178150 maven {
179151 name = " CThingMaven"
180152 setUrl(repoUrl)
181153 credentials {
182- username = property( " cthing.nexus. user" ) as String
183- password = property( " cthing.nexus. password" ) as String
154+ username = cthingRepo. user
155+ password = cthingRepo. password
184156 }
185157 }
186158 }
187159 }
188160}
189161
190- if (hasProperty( " signing.keyId " ) && hasProperty( " signing.password " ) && hasProperty( " signing.secretKeyRingFile " )) {
162+ if (cthingPublishing.canSign( )) {
191163 signing {
192164 sign(publishing.publications[" jar" ])
193165 }
0 commit comments