From 62913470bc3003c10b81a01694f0c93b2fcdcbf0 Mon Sep 17 00:00:00 2001 From: Jens Bendisposto <jens@bendisposto.de> Date: Fri, 31 Jul 2015 06:09:54 +0200 Subject: [PATCH] conditional configuration --- build.gradle | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index b3ea1ca..2ee8776 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,6 @@ apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'maven' -apply plugin: 'signing' project.version = '3.2.10' @@ -28,10 +27,6 @@ task sourcesJar(type: Jar) { from sourceSets.main.allSource } -signing { - sign configurations.archives -} - jar { manifest { attributes 'Main-Class': 'org.sablecc.sablecc.SableCC' @@ -44,6 +39,13 @@ artifacts { task deploy(dependsOn: [jar,test,javadoc], group: 'Build') +if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) { + +apply plugin: 'signing' + +signing { + sign configurations.archives +} uploadArchives { repositories { mavenDeployer { @@ -89,3 +91,4 @@ uploadArchives { } } } +} -- GitLab