XELLITIX Commons - Semantic Versioning

Semantic Versioning Models and Utilities

Лицензия

Лицензия

Группа

Группа

com.xellitix.commons
Идентификатор

Идентификатор

semver
Последняя версия

Последняя версия

0.6.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

XELLITIX Commons - Semantic Versioning
Semantic Versioning Models and Utilities
Ссылка на сайт

Ссылка на сайт

http://xellitix.com/semver/
Система контроля версий

Система контроля версий

https://github.com/Xellitix/commons-semver

Скачать semver

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.xellitix.commons/semver/ -->
<dependency>
    <groupId>com.xellitix.commons</groupId>
    <artifactId>semver</artifactId>
    <version>0.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.xellitix.commons/semver/
implementation 'com.xellitix.commons:semver:0.6.0'
// https://jarcasting.com/artifacts/com.xellitix.commons/semver/
implementation ("com.xellitix.commons:semver:0.6.0")
'com.xellitix.commons:semver:jar:0.6.0'
<dependency org="com.xellitix.commons" name="semver" rev="0.6.0">
  <artifact name="semver" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.xellitix.commons', module='semver', version='0.6.0')
)
libraryDependencies += "com.xellitix.commons" % "semver" % "0.6.0"
[com.xellitix.commons/semver "0.6.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.google.inject : guice jar 4.2.2
com.google.inject.extensions : guice-assistedinject jar 4.2.2
com.google.code.findbugs : jsr305 jar 3.0.2

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-all jar 1.10.19
org.assertj : assertj-core jar 3.11.1

Модули Проекта

Данный проект не имеет модулей.

XELLITIX Commons - Semantic Versioning

Semantic versioning Java library.

Usage

Parsing a Semantic Version

// Create the Google Guice injector
Injector injector = Guice.createInjector(new SemanticVersionModule());

// Create the version parser
SemanticVersionParser parser = injector.getInstance(SemanticVersionParser.class);

// Parse the version
SemanticVersion version = parser.parse("1.0.0-rc.1+x86-64.2");

// Get the version properties
version.getMajorVersion()       // int                : 1
version.getMinorVersion()       // int                : 0
version.getPatchVersion()       // int                : 0
version.getPreReleaseMetadata() // Optional<Metadata> : "rc.1"
version.getBuildMetadata()      // Optional<Metadata> : "x86-64.2"

Building a Semantic Version

// Create the Google Guice injector
Injector injector = Guice.createInjector(new SemanticVersionModule());

// Create the version builder
SemanticVersionBuilder builder = injector.getInstance(SemanticVersionBuilder.class);

// Build the Semantic Version
SemanticVersion version = builder
    .setMajorVersion(1)
    .addPreReleaseMetadataIdentifier("rc")
    .addPreReleaseMetadataIdentifier(1)
    .addBuildMetadataIdentifier("arm32")
    .addBuildMetadataIdentifier(54L)
    .build();

// Get the string representation of the version
version.toString(); // "1.0.0-rc.1+arm32.54";

Style

This project aims to adhere to the Google Java Style Guide.

Versioning

This project aims to adhere to Semantic Versioning 2.0.0.

Authors

com.xellitix.commons

XELLITIX

XELLITIX Open Source Software

Версии библиотеки

Версия
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0