Feign makes writing java http clients easier
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.6 KiB

12 years ago
apply plugin: 'release'
// Ignore release plugin's task because it calls out via GradleBuild. This is a good place to put an email to send out
task release(overwrite: true, dependsOn: commitNewVersion) << {
// This is a good place to put an email to send out
}
commitNewVersion.dependsOn updateVersion
updateVersion.dependsOn createReleaseTag
createReleaseTag.dependsOn preTagCommit
def buildTasks = tasks.matching { it.name =~ /:build/ }
preTagCommit.dependsOn buildTasks
preTagCommit.dependsOn checkSnapshotDependencies
//checkSnapshotDependencies.dependsOn confirmReleaseVersion // Introduced in 1.0, forces readLine
//confirmReleaseVersion.dependsOn unSnapshotVersion
checkSnapshotDependencies.dependsOn unSnapshotVersion // Remove once above is fixed
unSnapshotVersion.dependsOn checkUpdateNeeded
checkUpdateNeeded.dependsOn checkCommitNeeded
checkCommitNeeded.dependsOn initScmPlugin
// Call out to compile against internal repository
task uploadArtifactory(type: GradleBuild) {
startParameter = project.gradle.startParameter.newInstance()
startParameter.addInitScript( file('gradle/netflix-oss.gradle') )
startParameter.getExcludedTaskNames().add('check')
tasks = [ 'build', 'artifactoryPublish' ]
}
12 years ago
task buildWithArtifactory(type: GradleBuild) {
startParameter = project.gradle.startParameter.newInstance()
startParameter.addInitScript( file('gradle/netflix-oss.gradle') )
startParameter.getExcludedTaskNames().add('check')
tasks = [ 'build' ]
}
12 years ago
// Ensure upload happens before taggging but after all pre-checks
uploadArtifactory.dependsOn checkSnapshotDependencies
createReleaseTag.dependsOn uploadArtifactory
gradle.taskGraph.whenReady { taskGraph ->
if ( taskGraph.hasTask(uploadArtifactory) && !taskGraph.hasTask(':release') ) {
throw new GradleException('"release" task has to be run before uploading to Artifactory')
}
}
subprojects.each { project ->
project.uploadMavenCentral.dependsOn rootProject.checkSnapshotDependencies
rootProject.createReleaseTag.dependsOn project.uploadMavenCentral
gradle.taskGraph.whenReady { taskGraph ->
if ( taskGraph.hasTask(project.uploadMavenCentral) && !taskGraph.hasTask(':release') ) {
throw new GradleException('"release" task has to be run before uploading to Maven Central')
}
}
}
// Prevent plugin from asking for a version number interactively
ext.'gradle.release.useAutomaticVersion' = "true"
release {
// http://tellurianring.com/wiki/gradle/release
failOnCommitNeeded=false
failOnPublishNeeded=false
failOnUnversionedFiles=false
failOnUpdateNeeded=false
}