Giter Club home page Giter Club logo

semver4j's Introduction

Semantic Version for Java

Release Build Status GitHub Javadoc

Create, Parse, and Validate Semantic Version 2.0.0 strings.

Dependency

To use this library, add following dependency to your project -

Maven Dependency
<dependency>
  <groupId>com.github.manikmagar</groupId>
  <artifactId>semver4j</artifactId>
  <version>${semver4j.version}</version>
</dependency>
Gradle Dependency
implementation 'com.github.manikmagar:semver4j:${semver4j.version}'

Feature Implementation

  • ✓ Create Semantic core version (eg. 1.2.3)

  • ✓ Increment core Versions, examples:

    • 1.2.3 → 1.2.4

    • 1.2.3 → 1.3.0

    • 1.2.3 → 2.0.0

  • ✓ Validate core version

  • ✓ Add valid Prerelease identifiers, examples:

    • 1.2.3-alpha.1

    • 1.2.3-alpha.release.1

  • ✓ Add build metadata

    • 1.2.3+build.1

    • 1.2.3+build.commit.1

  • ❏ Compare Semantic versions based on specification precedence

  • ❏ Parse Semantic Version strings

Usage

Check SemVerTest.java for all usage examples.

SemVer Example
//Build Version 1.2.3-Alpha+Build-01
  var version = new SemVer(1, 2, 3)
    .with(prerelease("Alpha"))
    .with(build("Build-01"))
  System.out.println(version.toString())

Build

Run the following command to build this project:

./mvnw verify

Pass the -Dquick option to skip all non-essential plug-ins and create the output artifact as quickly as possible:

./mvnw verify -Dquick

Run the following command to format the source code and organize the imports as per the project’s conventions:

./mvnw compile -Dformat=true

License

This code base is available under the Apache License, version 2.

semver4j's People

Contributors

manikmagar avatar

Watchers

James Cloos avatar  avatar  avatar

semver4j's Issues

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.