Skip to content

A simple library for comparing versions!

License

Notifications You must be signed in to change notification settings

AuraDevelopmentTeam/VersionLib

Repository files navigation

Version Lib

Current Version Build Status Coverage Report Codacy Badge License

A simple library for comparing versions!

Table of Contents

Downloads

You can download all builds from:

Using this library

Adding it to your project

You can easily use this library by including it as a maven dependency, as all releases get uploaded to our maven repository. (Replace {version} with the appropriate version!)

Maven

<repositories>
    <repository>
        <id>AuraDevelopmentTeam</id>
        <url>https://maven.aura-dev.team/repository/auradev-releases/</url>
        <!--<url>https://maven.aura-dev.team/repository/auradev-snapshots/</url>-->
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>dev.aura.lib.version</groupId>
        <artifactId>VersionLib</artifactId>
        <version>{version}</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

Gradle

repositories {
    maven {
        name "AuraDevelopmentTeam"
        url "https://maven.aura-dev.team/repository/auradev-releases/"
        // url "https://maven.aura-dev.team/repository/auradev-snaptshots/"
    }
}

dependencies {
    compile "dev.aura.lib.version:VersionLib:{version}"
}

Usage

Create a new dev.aura.lib.version.Version object by passing it the version specifier as a string:

new Version("1.2.3-foobar");

Then you can use the normal methods like equals and compareTo to compare versions:

(new Version("1.2.3")).compareTo(new Version("1.2.4")) < 0; // -> true
(new Version("1.2.3")).equals(new Version("1.2.4"));        // -> false

If you found a bug or even are experiencing a crash please report it so we can fix it. Please check at first if a bug report for the issue already exits. If not just create a new issue and fill out the form.

Please include the following:

  • Version Lib version
  • Java version
  • For crashes:
    • Steps to reproduce
    • Logs if available

(When creating a new issue please follow the template)

If you want a new feature added, go ahead an open a new issue, remove the existing form and describe your feature the best you can. The more details you provide the easier it will be implementing it.
You can also talk to us on Discord.

Developing with our Plugin

So you want to add support or even develop an add-on for our plugin then you can easily add our API to your development environment, read the API documentation.

Setting up a Workspace/Compiling from Source

  • Clone:
    Clone the repository like this: git clone --recursive https://github.com/AuraDevelopmentTeam/VersionLib.git
  • IDE-Setup:
    Run [gradle] in the repository root: ./gradlew installLombok <eclipse|idea>
  • Build:
    Run [gradle] in the repository root: ./gradlew build. The build will be in build/libs
  • If obscure Gradle issues are found try running ./gradlew cleanCache clean

PGP Signing

All files will be signed with PGP.
The public key to verify it can be found in keys/publicKey.asc. The signatures of the files will also be found in the maven.

License

Version Lib is licensed under the MIT License

Support

Getting Support

If you need help with anything, want to discuss issues or suggestions, or just want to say hi, you can visit our Discord Server (https://discord.me/bungeechat).

Supporting us!

Thanks for scrolling down so far!
We are developing this plugin (and others!) as well as providing constant support for all our plugins free of charge so that as many people as possible can use it! Since it is still a lot of work we would really appreciate it if you could support us on Patreon!

Become a Patreon

Random Quote

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.

— Jamie Zawinski