forked from Yubico/yubikit-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.gradle
39 lines (33 loc) · 888 Bytes
/
publish.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
apply plugin: 'maven-publish'
apply plugin: 'signing'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
from components.java
apply from: rootProject.file('pom.gradle')
pom(pomData)
}
}
tasks.withType(Sign).configureEach {
onlyIf { isReleaseVersion && System.getenv("NO_GPG_SIGN") != "true" }
}
signing {
useGpgCmd()
sign publishing.publications.maven
}
repositories {
maven {
name 'sonatype'
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username = findProperty("sonatype.username")
password = findProperty("sonatype.password")
}
}
}
}