Skip to content

Commit 63e7fdb

Browse files
authored
build: Add support for signing. (#9)
1 parent 100d6b1 commit 63e7fdb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ jobs:
9393
command: ./gradlew javadoc checkstyleMain
9494
- run:
9595
name: Publish to local maven
96-
command: ./gradlew publishToMavenLocal
96+
command: ./gradlew publishToMavenLocal -P LD_SKIP_SIGNING=1

build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ checkstyle {
4343

4444
publishing {
4545
publications {
46-
mavenJava(MavenPublication) { publication ->
46+
mavenJava(MavenPublication) {
4747
from components.java
4848

4949
artifactId = 'launchdarkly-openfeature-serverprovider'
@@ -80,6 +80,19 @@ publishing {
8080
}
8181
}
8282

83+
signing {
84+
sign publishing.publications.mavenJava
85+
}
86+
87+
tasks.withType(Sign) { t ->
88+
onlyIf { !shouldSkipSigning() } // so we can build jars for testing in CI
89+
}
90+
91+
def shouldSkipSigning() {
92+
return "1".equals(project.findProperty("LD_SKIP_SIGNING")) ||
93+
"1".equals(System.getenv("LD_SKIP_SIGNING"))
94+
}
95+
8396
nexusPublishing {
8497
clientTimeout = java.time.Duration.ofMinutes(2) // we've seen extremely long delays in creating repositories
8598
repositories {

0 commit comments

Comments
 (0)