-
Notifications
You must be signed in to change notification settings - Fork 726
/
publishing.gradle
29 lines (26 loc) · 1.02 KB
/
publishing.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
// Sets up publishing of release artifacts.
// Note: Keep this script in sync across all airbnb open source projects.
apply plugin: 'com.vanniktech.maven.publish'
// https://vanniktech.github.io/gradle-maven-publish-plugin/other/
publishing {
repositories {
maven {
// The "name" value creates a task like `publishAllPublicationsTo[Name]Repository
// In this case, publishAllPublicationsToAirbnbArtifactoryRepository
name = 'airbnbArtifactory'
url = version.toString().endsWith("SNAPSHOT") ? findProperty("ARTIFACTORY_SNAPSHOT_URL") : findProperty("ARTIFACTORY_RELEASE_URL")
credentials {
username = findProperty("ARTIFACTORY_USERNAME")
password = findProperty("ARTIFACTORY_PASSWORD")
}
}
}
}
mavenPublishing {
if (findProperty("doNotSignRelease").toString().toBoolean()) {
println("Skipping release signing")
} else {
println("Signing release with gpg")
signAllPublications()
}
}