-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathdeploy.gradle
71 lines (58 loc) · 1.85 KB
/
deploy.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apply plugin: 'maven-publish'
apply plugin: 'signing'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
def generateJavadoc = project.hasProperty("generateJavadoc")
onlyIf { (isReleaseVersion || gradle.taskGraph.hasTask(":ui:publishToSonatype")) || generateJavadoc }
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
url = 'https://github.com/kotcrab/vis-ui/'
scm {
connection = 'scm:git:git@github.com:kotcrab/vis-ui.git'
developerConnection = 'scm:git:git@github.com:kotcrab/vis-ui.git'
url = 'git@github.com:kotcrab/vis-ui.git'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'kotcrab'
name = 'Kotcrab'
url = 'https://kotcrab.com'
}
}
}
}
}
}
nexusPublishing {
useStaging.set(provider {
!project.version.endsWith("-SNAPSHOT")
})
}
signing {
required { isReleaseVersion || gradle.taskGraph.hasTask(":ui:publishToSonatype") }
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
task publishSnapshot {
if (!isReleaseVersion) {
finalizedBy(tasks["publishToSonatype"])
}
}