Skip to content

Java library to check if software is up-to-date or outdated via GitHub API.

License

Notifications You must be signed in to change notification settings

rusthero/version-checker

Repository files navigation


VersionChecker

Java library to check if software is up-to-date or outdated via GitHub API.


Usage

We can check if latest release version of this repository, rusthero/version-checker is 1.2.0.

public static void main(String[] args) throws IOException, ReleaseOrRepoNotFoundException, RateLimitExceededException {
    Version currentVersion = new Version("1.2.0");

    GitHubVersionChecker versionChecker = new GitHubVersionChecker("rusthero", "version-checker");
    if (!versionChecker.isLatestVersion(currentVersion)) {
        System.out.println("README file is outdated!");
    }
}

See JavaDoc and tests for learning about other methods and functionality.

Artifacts

To use Version Checker, add my repository and the dependency.

Gradle

repositories {
    mavenCentral()
    maven {
        url 'https://rusthero.dev'
    }
}

dependencies {
    implementation 'dev.rusthero:version-checker:1.2.0'   
}

Maven

<repositories>
    <repository>
        <id>rusthero</id>
        <url>https://rusthero.dev</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>dev.rusthero</groupId>
        <artifactId>version-checker</artifactId>
        <version>1.2.0</version>
    </dependency>
</dependencies>

Manual installation

You can also install VersionChecker manually by downloading it from releases and adding it to your project.