From f2da5bc5b4038e170160e71a493e6223942a303f Mon Sep 17 00:00:00 2001 From: Andrew Reitz Date: Wed, 21 Sep 2016 11:40:29 -0500 Subject: [PATCH] Preparing for release --- RELEASE.md | 10 ++++++++++ build.gradle | 12 ++++++++++++ groovy-android-gradle-plugin/gradle-plugin.gradle | 4 ++-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..13ff8e3 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,10 @@ +# How to Release + +1) Prepare for release `./gradlew prepareRelease` +1) Update Version Number (remove -SNAPSHOT) +1) Run all tests `./gradlew clean check fullTest` +1) Run release task `./gradlew release` +1) Update Version Number in build.gradle and README.adoc + + + diff --git a/build.gradle b/build.gradle index c387470..c70b542 100644 --- a/build.gradle +++ b/build.gradle @@ -57,6 +57,18 @@ ext { groovyVersion = '2.4.7' } +task prepareRelease(type: Exec) { + description = 'Prepare for a release: Ensure branch is up to date' + group = 'Publishing' + + commandLine 'bash', '-c', +""" + git checkout master + git pull --rebase "https://$project.githubToken@github.com/groovy/groovy-android-gradle-plugin.git" master + git checkout -b release/${version} +""" +} + task tagRelease(type: Exec) { description = 'Tag the release and push it to github' group = 'Publishing' diff --git a/groovy-android-gradle-plugin/gradle-plugin.gradle b/groovy-android-gradle-plugin/gradle-plugin.gradle index f4fce8b..81e5a6f 100644 --- a/groovy-android-gradle-plugin/gradle-plugin.gradle +++ b/groovy-android-gradle-plugin/gradle-plugin.gradle @@ -50,7 +50,7 @@ task fullTest(type: Test) { task release { description = 'Releases a version of the plugin on Artifactory and Bintray' group = 'Publishing' - dependsOn artifactoryPublish, bintrayUpload, rootProject.tasks.tagRelease + dependsOn fullTest, artifactoryPublish, bintrayUpload, rootProject.tasks.tagRelease } tasks.withType(Test) { @@ -63,6 +63,6 @@ tasks.withType(Test) { dependsOn install testLogging { - exceptionFormat "full" + exceptionFormat 'full' } }