File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,18 @@ repositories {
103103uploadArchives {
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 {
Original file line number Diff line number Diff line change 11# Note that Maven- and signing-related properties are in <gradle-user-home>/gradle.properties
22javaVersion =1.5
3- version =2.5.4
3+ version =2.6.0-SNAPSHOT
You can’t perform that action at this time.
0 commit comments