Skip to content

Commit 26d44ec

Browse files
committed
Don't require Nexus secrets to configure publishing metadata
1 parent 54c352b commit 26d44ec

File tree

1 file changed

+38
-35
lines changed

1 file changed

+38
-35
lines changed

build.gradle

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ subprojects { project ->
219219
}
220220
}
221221

222-
if (publishEnabled && project.hasProperty('publishMe') && project.publishMe) {
222+
if (project.hasProperty('publishMe') && project.publishMe) {
223223

224224
apply plugin: 'maven-publish'
225225
apply plugin: 'signing'
@@ -266,56 +266,59 @@ subprojects { project ->
266266
}
267267
}
268268

269-
signing {
270-
useGpgCmd()
271-
sign publishing.publications.jars
269+
if (publishEnabled) {
270+
signing {
271+
useGpgCmd()
272+
sign publishing.publications.jars
273+
}
272274
}
273275
}
276+
274277
}
275278

276279
// The root project has no sources, but the dependency platform also needs to be published as an artifact
277280
// See https://docs.gradle.org/current/userguide/java_platform_plugin.html
278281
// See https://github.com/Yubico/java-webauthn-server/issues/93#issuecomment-822806951
279-
if (publishEnabled) {
280-
apply plugin: 'maven-publish'
281-
apply plugin: 'signing'
282-
283-
publishing {
284-
publications {
285-
jars(MavenPublication) {
286-
from components.javaPlatform
287-
288-
pom {
289-
name = project.name
290-
description = project.description
291-
url = 'https://developers.yubico.com/java-webauthn-server/'
292-
293-
developers {
294-
developer {
295-
id = 'emil'
296-
name = 'Emil Lundberg'
297-
298-
}
282+
apply plugin: 'maven-publish'
283+
apply plugin: 'signing'
284+
285+
publishing {
286+
publications {
287+
jars(MavenPublication) {
288+
from components.javaPlatform
289+
290+
pom {
291+
name = project.name
292+
description = project.description
293+
url = 'https://developers.yubico.com/java-webauthn-server/'
294+
295+
developers {
296+
developer {
297+
id = 'emil'
298+
name = 'Emil Lundberg'
299+
299300
}
301+
}
300302

301-
licenses {
302-
license {
303-
name = 'BSD-license'
304-
comments = 'Revised 2-clause BSD license'
305-
}
303+
licenses {
304+
license {
305+
name = 'BSD-license'
306+
comments = 'Revised 2-clause BSD license'
306307
}
308+
}
307309

308-
scm {
309-
url = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
310-
connection = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
311-
developerConnection = 'scm:git:ssh://[email protected]/Yubico/java-webauthn-server.git'
312-
tag = 'HEAD'
313-
}
310+
scm {
311+
url = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
312+
connection = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
313+
developerConnection = 'scm:git:ssh://[email protected]/Yubico/java-webauthn-server.git'
314+
tag = 'HEAD'
314315
}
315316
}
316317
}
317318
}
319+
}
318320

321+
if (publishEnabled) {
319322
signing {
320323
useGpgCmd()
321324
sign publishing.publications.jars

0 commit comments

Comments
 (0)