Skip to content

A simple Java library that checks for updates from a GitHub repo's releases

Notifications You must be signed in to change notification settings

TechnicJelle/UpdateCheckerJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Update Checker

Latest Release

A simple update checker for your Java application that checks GitHub releases.

Install as dependency in Maven/Gradle

Visit https://repo.bluecolored.de/#/releases/com/technicjelle/UpdateChecker for instructions on how to add this library as a dependency to your project.

You may want to shade the library!

Usage

Simply instantiate a new UpdateChecker object with your GitHub username, repository name and the current version of your program.
It uses this to compare to the latest GitHub release tag.

Then call .check() or .checkAsync() on the instance to check for updates.

You can then log the update message with logUpdateMessage() or logUpdateMessageAsync().

UpdateChecker updateChecker = new UpdateChecker("TechnicJelle", "UpdateCheckerJava", "2.0");
updateChecker.check();
updateChecker.logUpdateMessage(logger);

Please see the javadoc for the full API reference:

If you want to disable the update checker, you can do so by passing -Dtechnicjelle.updatechecker.disabled as a JVM argument.
Example: java -Dtechnicjelle.updatechecker.disabled -jar server.jar