https://github.com/reviversmc/modget-manifest-api
API for accessing Modget manifests and manifest repositories
https://github.com/reviversmc/modget-manifest-api
api library
Last synced: 6 days ago
JSON representation
API for accessing Modget manifests and manifest repositories
- Host: GitHub
- URL: https://github.com/reviversmc/modget-manifest-api
- Owner: ReviversMC
- License: lgpl-3.0
- Created: 2021-10-09T15:10:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T11:24:27.000Z (over 4 years ago)
- Last Synced: 2025-02-23T22:41:26.654Z (over 1 year ago)
- Topics: api, library
- Language: Java
- Homepage:
- Size: 473 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Modget Manifest API
This API provides basic functionality for accessing Modget manifests and manifest repositories.
To use it, add jitpack to the end of your `build.gradle` repositories:
```gradle
repositories {
...
maven {
url = "https://jitpack.io"
}
}
```
From here on, it depends on what you're trying to achieve. If you already know you're going to work with a repository using a specific manifest spec, let's say v4, you can simply add the manifest-api-spec4 package to your dependencies:
```gradle
api "com.github.ReviversMC.modget-manifest-api:spec4:${modget_manifest_api_version}"
```
But what if you need to support multiple generations of manifest specifications? [Modget-Minecraft](https://github.com/ReviversMC/modget-minecraft) for example allows users to add custom repositories, though it can't expect that these will always be up-to-date with the latest spec. Hence, we created a compatibility module which you can add this way:
```gradle
implementation "com.github.ReviversMC.modget-manifest-api:compat:${modget_manifest_api_version}"
```
Additionally, you still need to implement a specific manfifest specification's API like above. This method allows you to work with features from the later manifest specs, while still retaining backwards compatibility with the older ones. Be aware though that trying to read certain values introduced by newer specs from a manifest with an old spec will return in a `null` value, so you should handle these cases well.