Skip to content

Commit 2ecb5aa

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents e23bea0 + fd3d286 commit 2ecb5aa

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

build.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,18 @@ repositories {
103103
uploadArchives {
104104
repositories {
105105
mavenDeployer {
106-
repository(url: 'file:///' + projectDir + '/../localMavenRepo')
107106
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
107+
if (project.hasProperty('upload') && Boolean.parseBoolean(upload)) { // gradlew -Pupload=true
108+
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
109+
authentication(userName: ossrhUsername, password: ossrhPassword)
110+
}
111+
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
112+
authentication(userName: ossrhUsername, password: ossrhPassword)
113+
}
114+
}
115+
else {
116+
repository(url: 'file:///' + projectDir + '/../localMavenRepo')
117+
}
108118
pom {
109119
groupId = 'com.fifesoft'
110120
name = 'autocomplete'
@@ -143,7 +153,9 @@ uploadArchives {
143153
url 'https://github.com/bobbylight/AutoComplete'
144154
connection 'scm:git:git://github.com/bobbylight/AutoComplete'
145155
developerConnection 'scm:git:[email protected]:bobbylight/AutoComplete'
146-
tag '2.5.4'
156+
if (!project.version.endsWith('-SNAPSHOT')) {
157+
tag project.version
158+
}
147159
}
148160

149161
developers {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Note that Maven- and signing-related properties are in <gradle-user-home>/gradle.properties
22
javaVersion=1.5
3-
version=2.5.4
3+
version=2.6.0-SNAPSHOT

0 commit comments

Comments
 (0)