https://github.com/technicjelle/updatecheckerjava
A simple Java library that checks for updates from a GitHub repo's releases
https://github.com/technicjelle/updatecheckerjava
Last synced: about 1 month ago
JSON representation
A simple Java library that checks for updates from a GitHub repo's releases
- Host: GitHub
- URL: https://github.com/technicjelle/updatecheckerjava
- Owner: TechnicJelle
- Created: 2023-05-03T21:29:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T22:41:18.000Z (10 months ago)
- Last Synced: 2025-03-28T00:05:58.042Z (about 2 months ago)
- Language: Java
- Size: 38.1 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Update Checker
[](https://repo.bluecolored.de/#/releases/com/technicjelle/UpdateChecker)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()`.
```java
UpdateChecker updateChecker = new UpdateChecker("TechnicJelle", "UpdateCheckerJava", "2.0");
updateChecker.check();
updateChecker.logUpdateMessage(logger);
```Please see the javadoc for the full API reference:
- main (latest commit): https://technicjelle.com/UpdateCheckerJava
- latest release: https://repo.bluecolored.de/javadoc/releases/com/technicjelle/UpdateChecker/latest
- Also has docs for previous releases (v2.5 and up)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`