[DRAFT] [FEATURE] Support for Hangar platform - #121
Conversation
(cherry picked from commit d4a6f05)
|
@a6tumn did you see my review comments for some stuff |
I do not, although that may just be because it is a draft. If you have any bug fixes or would like to contribute, feel free to PR into my branch or DM me on Discord(user is chronictsuki). |
srnyx
left a comment
There was a problem hiding this comment.
didnt know i had to actually click "submit review"... thats awkward..
| * List of supported platform versions, i.e. `listOf("26.1", "26.1.1")`. | ||
| */ | ||
| @get:Input | ||
| val platformVersions: ListProperty<String> |
There was a problem hiding this comment.
Is it possible to somehow use the existing top-level Minecraft versions option for PAPER platform automatically? Seems trivial to have to specify it twice (once in top-level for other platforms and again here for Hangar).
WATERFALL also uses Minecraft versions but only up to 1.21.0. VELOCITY does NOT use Minecraft versions and has its complete own versioning (currently on 3.5.0-SNAPSHOT).
There was a problem hiding this comment.
Actually, maybe just switch to what Curseforge uses with CurseforgeVersions. So have a HangarVersions, idk
Hangar has https://hangar.papermc.io/api-docs#get-/api/v1/platforms/-platform-/versions to get versions for platforms
| HangarApi.PluginDependency( | ||
| name = it.name.get(), | ||
| type = it.type.get(), | ||
| externalUrl = it.url.orNull ?: "$apiEndpoint/projects/${api.encodeSlug(id.get())}/", |
There was a problem hiding this comment.
Files are either uploaded using multi-part form data (see this gist for an example) or they have an external URL.
Basically, they can't have both. So if an external URL is provided for a file, the URL should be used. But if not, then externalUrl should NOT be set and it should upload the file directly.
|
Hoping to get some time to work on this in the next couple of weeks. It’s still something I plan to complete. |


Info
I've been quite busy helping out with Twilight Forest lately, so this work will probably take some time to complete. I decided to open a draft in case anybody else wanted to contribute to the platform implementation while I was still working on it. The code at the moment is just a skeleton implementation, and I'm sure there will be a lot of changes necessary to get it to a functioning state. I've also decided to mark the API as incubating since there are likely to be other plugin platforms supported in the future and common abstractions may be added.