-
Notifications
You must be signed in to change notification settings - Fork 1
/
publish.gradle
55 lines (49 loc) · 1.79 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apply plugin: 'maven-publish'
apply plugin: 'signing'
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
all {
pom {
url = 'https://github.com/xenit-eu/solr-backup'
name = "solr-backup"
description = project.description
scm {
connection = 'scm:git:git@github.com:xenit-eu/solr-backup.git'
developerConnection = 'scm:git:git@github.com:xenit-eu/solr-backup.git'
url = 'https://github.com/xenit-eu/solr-backup.git'
}
developers {
developer {
id = "xenit"
name = "Xenit Solutions NV"
}
}
licenses {
license {
name = 'Apache License v2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.toString().endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.findProperty('sonatype_username')
password = project.findProperty('sonatype_password')
}
}
}
}
signing {
required { !version.toString().endsWith("SNAPSHOT") }
useInMemoryPgpKeys(findProperty("signingKeyId"), findProperty("signingKey"), findProperty("signingPassword"))
sign publishing.publications
}