diff --git a/build.gradle b/build.gradle index 9eef3329..c0d2d5e7 100644 --- a/build.gradle +++ b/build.gradle @@ -2,18 +2,39 @@ ext.releaseVersion = '1.1.3' // TEMPLATE: Set to latest release ext.githubProjectName = rootProject.name // TEMPLATE: change to match github project, if it doesn't match project name +buildscript { + repositories { mavenCentral() } +} + +allprojects { + repositories { mavenCentral() } +} + +//apply from: file('gradle/release.gradle') // Not fully tested apply from: file('gradle/convention.gradle') apply from: file('gradle/maven.gradle') apply from: file('gradle/check.gradle') -apply from: file('gradle/license.gradle') +//apply from: file('gradle/license.gradle') // Waiting for re-release subprojects { - group = 'com.netflix.osstemplate' // TEMPLATE: Set to organization of project - - repositories { - mavenCentral() + // 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' + } + } } + group = 'com.netflix.osstemplate' // TEMPLATE: Set to organization of project + dependencies { compile 'javax.ws.rs:jsr311-api:1.1.1' compile 'com.sun.jersey:jersey-core:1.11' diff --git a/gradle/convention.gradle b/gradle/convention.gradle index a3fc06dd..92551612 100644 --- a/gradle/convention.gradle +++ b/gradle/convention.gradle @@ -26,7 +26,6 @@ subprojects } artifacts { - archives jar archives sourcesJar archives javadocJar } diff --git a/gradle/license.gradle b/gradle/license.gradle index 9d048303..1fdc2702 100644 --- a/gradle/license.gradle +++ b/gradle/license.gradle @@ -1,5 +1,5 @@ buildscript { - dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.4' } + dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5' } } -apply plugin: 'license' \ No newline at end of file +apply plugin: nl.javadude.gradle.plugins.license.LicensePlugin diff --git a/gradle/maven.gradle b/gradle/maven.gradle index cb75dfb6..ab2792ff 100644 --- a/gradle/maven.gradle +++ b/gradle/maven.gradle @@ -4,14 +4,14 @@ subprojects { apply plugin: 'signing' signing { - required { performingRelease && gradle.taskGraph.hasTask("uploadMavenCentral")} + required { performingRelease && gradle.taskGraph.hasTask("uploadArchives")} sign configurations.archives } /** * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html */ - task uploadMavenCentral(type:Upload) { + task uploadArchives(type:Upload) { configuration = configurations.archives dependsOn signArchives doFirst { @@ -35,7 +35,6 @@ subprojects { artifactId 'oss-parent' version '7' } - url "https://github.com/Netflix/${rootProject.ext.githubProjectName}" licenses { license { name 'The Apache Software License, Version 2.0' @@ -43,15 +42,6 @@ subprojects { distribution 'repo' } } - scm { - connection "scm:git:git@github.com:Netflix/${rootProject.ext.githubProjectName}.git" - url "scm:git:git@github.com:Netflix/${rootProject.ext.githubProjectName}.git" - developerConnection "scm:git:git@github.com:Netflix/${rootProject.ext.githubProjectName}.git" - } - issueManagement { - system 'github' - url 'https://github.com/Netflix/${rootProject.ext.githubProjectName}/issues' - } } } } diff --git a/gradle/release.gradle b/gradle/release.gradle new file mode 100644 index 00000000..8fc34dbf --- /dev/null +++ b/gradle/release.gradle @@ -0,0 +1,6 @@ +buildscript { + dependencies { classpath group: 'no.entitas.gradle', name: 'gradle-release-plugin', version: '1.11' } +} + +apply plugin: no.entitas.gradle.git.GitReleasePlugin // 'gitrelease' +