All Projects → netzwerg → gradle-release-plugin

netzwerg / gradle-release-plugin

Licence: Apache-2.0 license
Gradle plugin providing very minimal release version numbering (Git-specific)

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to gradle-release-plugin

Axion Release Plugin
Gradle release & version management plugin.
Stars: ✭ 372 (+765.12%)
Mutual labels:  gradle-plugin, semantic-versioning, release-automation
bump
🌻 CLI tool to draft a GitHub Release for the next semantic version
Stars: ✭ 40 (-6.98%)
Mutual labels:  semantic-versioning, release-automation
gradle-versioner
Gradle Version Plugin. Generates semantic versions with git meta data per branch.
Stars: ✭ 25 (-41.86%)
Mutual labels:  gradle-plugin, semantic-versioning
expublish
Automates semantic release versioning and best practices for elixir packages.
Stars: ✭ 17 (-60.47%)
Mutual labels:  semantic-versioning, release-automation
Gradle Release
gradle-release is a plugin for providing a Maven-like release process for projects using Gradle
Stars: ✭ 731 (+1600%)
Mutual labels:  gradle-plugin, release-automation
Android Snapshot Publisher
Gradle plugin to deploy Android Snapshot Versions
Stars: ✭ 145 (+237.21%)
Mutual labels:  gradle-plugin, release-automation
Gradle Semantic Build Versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 69 (+60.47%)
Mutual labels:  gradle-plugin, semantic-versioning
Shipkit
Toolkit for shipping it used by Mockito library
Stars: ✭ 157 (+265.12%)
Mutual labels:  gradle-plugin, release-automation
boost
Boost Maven and Gradle plugins for MicroProfile development
Stars: ✭ 27 (-37.21%)
Mutual labels:  gradle-plugin
gretty
Advanced gradle plugin for running web-apps on jetty and tomcat.
Stars: ✭ 116 (+169.77%)
Mutual labels:  gradle-plugin
gradle-plugin-starter
Gradle plugin template project
Stars: ✭ 34 (-20.93%)
Mutual labels:  gradle-plugin
spotbugs-gradle-plugin
plugins.gradle.org/plugin/com.github.spotbugs
Stars: ✭ 137 (+218.6%)
Mutual labels:  gradle-plugin
gradle-scalafmt
Gradle plugin for scalafmt
Stars: ✭ 25 (-41.86%)
Mutual labels:  gradle-plugin
GradleMongoPlugin
Gradle plugin for running a managed instance of Mongo.
Stars: ✭ 48 (+11.63%)
Mutual labels:  gradle-plugin
webdriver-binaries-gradle-plugin
A Gradle plugin that downloads and caches WebDriver binaries specific to the OS the build runs on
Stars: ✭ 31 (-27.91%)
Mutual labels:  gradle-plugin
gradle-j2cl-plugin
Gradle J2CL Plugin
Stars: ✭ 18 (-58.14%)
Mutual labels:  gradle-plugin
gradle-cpd-plugin
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Stars: ✭ 88 (+104.65%)
Mutual labels:  gradle-plugin
scalatest-junit-runner
JUnit 5 runner for Scalatest
Stars: ✭ 30 (-30.23%)
Mutual labels:  gradle-plugin
xmake-gradle
A gradle plugin that integrates xmake seamlessly
Stars: ✭ 31 (-27.91%)
Mutual labels:  gradle-plugin
next-ver
Tells you the next semantic version for your local package
Stars: ✭ 27 (-37.21%)
Mutual labels:  semantic-versioning

⚠️ NO LONGER MAINTAINED – USE AT YOUR OWN RISK! ⚠️

gradle-release-plugin Build Status

Gradle plugin providing very minimal release version numbering.

The plugin assumes a MAJOR.MINOR.PATCH[-SNAPSHOT] version pattern kept in a version.txt file.

It provides the following functionality:

  • Initializes project.version from version.txt
  • Offers tasks for different release strategies:
    • release - Creates a tagged non-SNAPSHOT release (using the current version as specified in the version.txt file)
    • releaseMajorVersion - Upgrades to next major version & creates a tagged non-SNAPSHOT release.
    • releaseMinorVersion - Upgrades to next minor version & creates a tagged non-SNAPSHOT release.
  • Prepares version.txt for next SNAPSHOT iteration (i.e. bumps PATCH portion)

Usage

IMPORTANT: In multi-module builds, these steps should only be performed on the root project

  1. Create a version.txt (with e.g. 0.1.0-SNAPSHOT) right next to your build script
  2. Apply the plugin in your build script (see below)
  3. Call gradle clean release

Applying the plugin

The plugin is hosted on Bintray and can be applied as follows:

New plugin mechanism (as of Gradle 2.1):

plugins {
  id 'ch.netzwerg.release' version 'x.y.z'
}

Older Gradle versions:

buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath 'ch.netzwerg:gradle-release-plugin:x.y.z'
  }
}
apply plugin: 'ch.netzwerg.release'

Details

During the application phase, the plugin initializes the project.version according to the contents of a version.txt file (e.g. 1.2.3-SNAPSHOT).

During the configuration phase, the plugin checks if any of the releaseXXX tasks is called explicitly. It then upgrades the project.version and version.txt contents according to the following strategies:

  • Task release: Remove -SNAPSHOT from current version (e.g. 1.2.3)
  • Task releaseMajorVersion: Upgrade to next major version (e.g. 2.0.0)
  • Task releaseMinorVersion: Upgrade to next minor version (e.g. 1.3.0)

During the execution phase, the releaseXXX tasks tag the Git repository and prepare the version.txt contents for the next SNAPSHOT iteration. The tasks perform the following steps:

  • Commit modified version.txt
  • Tag Git repo (e.g. v1.2.3)
  • Increment version number in version.txt to next SNAPSHOT (e.g. 1.2.4-SNAPSHOT)
  • Again commit modified version.txt
  • Optionally push changes to Git remote (works from any branch)

Note that all releaseXXX tasks run non-interactively and are thus well suited for continuous integration.

Configuration

This plugin follows a "no surprise" policy. Consequently, no configuration is needed in the majority of cases. The following snippet illustrates all configuration options, their default values, and possible alternatives:

release {
  dependsOn build // 'distZip' could e.g be used in combination with the 'application' plugin
  push = false // 'true' would e.g. be useful when triggering the release task on a CI server
  versionSuffix = '-SNAPSHOT' // '.DEV' or '' (empty) could be useful alternatives
  tagPrefix = 'v' // 'r' or '' (empty) could be useful alternatives
}

Note: In multi-projects scenarios, the root project usually does not have a build task. Consequently, the release task will fail with its current default settings. Please use release.dependsOn subprojects.build (after the subprojects block) to work around this issue.

Read-Only Properties

Use project.release.versionFile to e.g. include the version.txt file in your final release bundle. The Git release tag can be accessed via project.release.tagName.

Acknowledgements

License

This plugin is available under the Apache License, Version 2.0.

© by Rahel Lüthy

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].