From 3b3e972c99b72f460af68a8a3cabbfb5b5f46c74 Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Sun, 21 Jun 2015 09:02:03 +0200 Subject: [PATCH] This should fix the missing ossrhUsername problem --- build.gradle | 62 +++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index 8a98573..e344836 100644 --- a/build.gradle +++ b/build.gradle @@ -32,41 +32,43 @@ subprojects { } } - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + if (hasProperty('ossrhUsername')) { + uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: ossrhUsername, password: ossrhPassword) - } - - snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: ossrhUsername, password: ossrhPassword) - } - - pom.project { - name 'Jabit' - packaging 'jar' - url 'https://github.com/Dissem/Jabit' - - scm { - connection 'scm:git:https://github.com/Dissem/Jabit.git' - developerConnection 'scm:git:git@github.com:Dissem/Jabit.git' - url 'https://github.com/Dissem/Jabit.git' + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername, password: ossrhPassword) } - licenses { - license { - name 'The Apache License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + pom.project { + name 'Jabit' + packaging 'jar' + url 'https://github.com/Dissem/Jabit' + + scm { + connection 'scm:git:https://github.com/Dissem/Jabit.git' + developerConnection 'scm:git:git@github.com:Dissem/Jabit.git' + url 'https://github.com/Dissem/Jabit.git' } - } - developers { - developer { - name 'Christian Basler' - email 'chrigu.meyer@gmail.com' + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + name 'Christian Basler' + email 'chrigu.meyer@gmail.com' + } } } }