diff --git a/build.gradle b/build.gradle index c0d2d5e7..0fc71a50 100644 --- a/build.gradle +++ b/build.gradle @@ -20,16 +20,16 @@ subprojects { // Closure to configure all the POM with extra info, common to all projects pom { project { - url "https://github.com/Netflix/${rootProject.githubProjectName}" - scm { - connection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git" - url "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git" - developerConnection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git" - } - issueManagement { - system 'github' - url 'https://github.com/Netflix/${rootProject.githubProjectName}/issues' - } + url "https://github.com/Netflix/${rootProject.githubProjectName}" + scm { + connection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git" + url "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git" + developerConnection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git" + } + issueManagement { + system 'github' + url 'https://github.com/Netflix/${rootProject.githubProjectName}/issues' + } } } @@ -57,7 +57,6 @@ project(':template-server') { compile 'com.sun.jersey:jersey-server:1.11' compile 'com.sun.jersey:jersey-servlet:1.11' compile project(':template-client') - testCompile 'org.mockito:mockito-core:1.8.5' } } diff --git a/gradle/maven.gradle b/gradle/maven.gradle index ab2792ff..3de09904 100644 --- a/gradle/maven.gradle +++ b/gradle/maven.gradle @@ -3,17 +3,21 @@ subprojects { apply plugin: 'maven' // Java plugin has to have been already applied for the conf2scope mappings to work apply plugin: 'signing' - signing { - required { performingRelease && gradle.taskGraph.hasTask("uploadArchives")} - sign configurations.archives + gradle.taskGraph.whenReady { taskGraph -> + if (taskGraph.hasTask("uploadMavenCentral")) { + signing { + required true + sign configurations.archives + } + } } /** * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html */ - task uploadArchives(type:Upload) { + task uploadMavenCentral(type:Upload) { configuration = configurations.archives - dependsOn signArchives + dependsOn 'signArchives' doFirst { repositories.mavenDeployer { beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment) }