https://github.com/milkdrinkers/versionwatch
Lightweight Java library to fetch the latest software versions from Spigot, Modrinth, GitHub, and more, with SemVer parsing and sync/async support.
https://github.com/milkdrinkers/versionwatch
async builtbybit bukkit curseforge github-api gradle hangar java java-8 java-library maven minecraft-plugins modrinth paper polymart semver spigot update-checker version-checker
Last synced: 2 months ago
JSON representation
Lightweight Java library to fetch the latest software versions from Spigot, Modrinth, GitHub, and more, with SemVer parsing and sync/async support.
- Host: GitHub
- URL: https://github.com/milkdrinkers/versionwatch
- Owner: milkdrinkers
- License: mit
- Created: 2024-12-22T16:04:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-06T09:17:01.000Z (3 months ago)
- Last Synced: 2026-04-06T11:23:37.144Z (3 months ago)
- Topics: async, builtbybit, bukkit, curseforge, github-api, gradle, hangar, java, java-8, java-library, maven, minecraft-plugins, modrinth, paper, polymart, semver, spigot, update-checker, version-checker
- Language: Java
- Homepage: https://docs.milkdrinkers.dev/versionwatch
- Size: 295 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Cla: docs/CONTRIBUTOR_LICENSE_AGREEMENT.md
Awesome Lists containing this project
README
VersionWatch
_**VersionWatch** is a lightweight, easy-to-use Java library that simplifies version monitoring across popular software distribution platforms. It supports both synchronous and asynchronous requests and leverages **Semantic Versioning (Semver)** for parsing and comparing versions via the [`Java-Semver`](https://github.com/MilkDrinkers/Java-Semver) library._
## Features
- **Java 8+ compatible**: Works with Java 8 and upwards.
- **Wide Support**: Supports fetching versions from **Spigot**, **Modrinth**, **CurseForge**, **GitHub**, **Hangar**, **BuiltByBit** and **Polymart**.
- **Sync/Async support**: Choose between blocking or non-blocking requests.
- **Well-tested**: Robust JUnit test coverage ensures reliability.
- **Simple API**: Minimal setup and intuitive methods.
- **Semver Support**: Built on [`Java-Semver`](https://github.com/MilkDrinkers/Java-Semver) for reliable parsing and comparison of semantic versions.
- **Light**: The library is built with bundle size in mind to keep your application small.
## 📦 Installation
Add VersionWatch and its `Java-Semver` dependency to your project with Maven or Gradle:
Gradle Kotlin DSL
```kotlin
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.milkdrinkers:versionwatch:LATEST_VERSION")
implementation("io.github.milkdrinkers:javasemver:LATEST_VERSION")
}
```
Maven
```xml
io.github.milkdrinkers
versionwatch
LATEST_VERSION
io.github.milkdrinkers
javasemver
LATEST_VERSION
```
## Usage Example 🚀
```java
import io.github.milkdrinkers.javasemver.Version;
import io.github.milkdrinkers.versionwatch.Platform;
import io.github.milkdrinkers.versionwatch.VersionWatcher;
final Version currentVersion = Version.of("1.0.0");
// Build a version watcher for spigot
final VersionWatcher watcher = VersionWatcher.builder()
.withPlatform(Platform.Spigot)
.withVersion(currentVersion)
.withResourceId("1234567")
.withAgent("VersionWatch")
.build();
// Fetch the latest version with a blocking request
final Version latestVersion = watcher.fetchLatest(); // The result is cached in the watcher
System.out.println("Has update: " + !watcher.isLatest().toString())
```
## 📚 Documentation
- [Full Javadoc Documentation](https://javadoc.io/doc/io.github.milkdrinkers/versionwatch)
- [Documentation](https://docs.milkdrinkers.dev/versionwatch)
- [Maven Central](https://central.sonatype.com/artifact/io.github.milkdrinkers/versionwatch)
---
## 🔨 Building from Source
```bash
git clone https://github.com/milkdrinkers/VersionWatch.git
cd versionwatch
./gradlew publishToMavenLocal
```
---
## 🔧 Contributing
Contributions are always welcome! Please make sure to read our [Contributor's Guide](CONTRIBUTING.md) for standards and our [Contributor License Agreement (CLA)](CONTRIBUTOR_LICENSE_AGREEMENT.md) before submitting any pull requests.
We also ask that you adhere to our [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure this community remains a place where all feel welcome to participate.
---
## 📝 Licensing
You can find the license the source code and all assets are under [here](../LICENSE). Additionally, contributors agree to the Contributor License Agreement \(_CLA_\) found [here](CONTRIBUTOR_LICENSE_AGREEMENT.md).
---
## 🔥 Consuming Projects
Here is a list of known projects using VersionWatch:
- [Minecraft-Plugin-Template](https://github.com/milkdrinkers/Minecraft-Plugin-Template) - _Provided by default in a Minecraft Plugin Template._
- [RaidsPerRegion](https://github.com/Alathra/RaidsPerRegion) - _RaidsPerRegion a Minecraft PvE raids plugin._
- [Maquillage](https://github.com/milkdrinkers/Maquillage) - _Maquillage a Minecraft cosmetics plugin._
- [Stewards](https://github.com/milkdrinkers/Stewards) - _Stewards a Minecraft Towny NPC extension plugin._
- [CharacterCards](https://github.com/Alathra/CharacterCards) - _CharacterCards is a Minecraft plugin allowing players to create cards describing their character._
- (_Add your project here!_)