Skip to content

Commit b0d0e14

Browse files
committed
Add GPG signing
1 parent fb129fe commit b0d0e14

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

library/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'maven-publish'
3+
apply plugin: 'signing'
34

45
ext {
56

@@ -81,6 +82,16 @@ afterEvaluate {
8182
}
8283
}
8384

85+
signing {
86+
// gpg on MacOS is the same as gpg2
87+
// ln -s /usr/local/bin/gpg /usr/local/bin/gpg2
88+
// Make sure to populate the variables in gradle.properties
89+
// signing.gnupg.keyName=XXX
90+
// signing.gnupg.passpharse
91+
useGpgCmd()
92+
sign(publishing.publications)
93+
}
94+
8495
task sourcesJar(type: Jar) {
8596
from android.sourceSets.main.java.srcDirs
8697
archiveClassifier.set("sources")

0 commit comments

Comments
 (0)