Skip to content

Commit 4bd9a8b

Browse files
authored
Merge pull request #293 from intercom/seanhealy/addGPG2Keys
Add GPG2 singing for Java Jars
2 parents c75af87 + 419617d commit 4bd9a8b

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ hs_err_pid*
1818
intercom-java/.project
1919

2020
.project
21+
securing.gpg

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ buildscript {
1010
}
1111
}
1212

13+
plugins {
14+
id 'signing'
15+
}
16+
1317
allprojects {
1418
apply plugin: 'idea'
1519
}

intercom-java/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ bintray {
6969
}
7070
}
7171

72+
signing {
73+
String keyId = System.getenv('keyId');
74+
String gpgPassword = System.getenv('gpgPassword');
75+
if (project.hasProperty('signing.keyId') != null && gpgPassword != null && project.hasProperty('signing.secretKeyRingFile')) {
76+
sign configurations.archives
77+
}
78+
}
79+
7280
ext.repo = Grgit.open(project.file('..'))
7381

7482
task printVersion << {

0 commit comments

Comments
 (0)