Giter VIP home page Giter VIP logo

gradle-versioner's Introduction

Gradle Versioner Plugin

Build Status

Gradle Version Compatible Versioner Version
< 2.2.1 1.0.58.master.5666bb7
2.2.1 - 2.3 2.0+
>= 2.4 2.1+

The Versioner

For gradle projects, this plugin can generate a version based on git tags and other pieces of information from the git repo. Because the version is derived from the state of your git repo, you don't have to worry about maintaining the version value in your gradle.build file as you merge and/or branch; it'll always output the correct value.

For example, if i had a gradle build that generated a jar, in the master branch the version of the jar would be

Version: 2.1.6.master.d9741b1
Produced Artifact: my-project-2.1.6.master.d9741b1.jar

and in the feature/fixing-something branch, it would be

Version: 0.0.6.feature-fixing-something.c3751f4
Produced artifact: my-project-0.0.6.feature-fixing-something.c3751f4.jar

The version of the project was derived from the state of the git repo.

We also have the commit-hash at the end, so if we ever wanted to branch off a particular commit, or checkout that commit, the information is stored in the version string.

You can read more about the gradle-versioner, how its can be used and configured

The Version Resolver

The version resolver has two functionalities.

Resolving version ranges

The version-resolver allows us to specify version ranges and dynamic gradle versions.

So you would be able to do something like

compile 'com.sarhanm:my-project:1.2.master+
compile 'com.sarhanm:my-other-proj:[1.2.3.feature-fixing-something,)
compile 'com.sarhanm:another-proj:(1.2.3.master,1.3.0.master) 

Read the full documentation on version-resolver

Version Manifest Resolution

When using the version-resolver plugin, you can specify a yaml file that contains all the versions of all the dependencies your company will use.

This is similar to maven's "dependencyManagement".

Read the full documentation on the version manifest

gradle-versioner's People

Contributors

mohammadsarhan avatar sarhanm avatar steveperrin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.