modmuss50 / mod-publish-plugin

A Gradle plugin to publish mods to a range of destinations
https://modmuss50.github.io/mod-publish-plugin/
MIT License
56 stars 9 forks source link

Mod publishes successfully but gradle crashes saying it failed #11

Closed ApexModder closed 1 year ago

ApexModder commented 1 year ago

When executing the publishMods task, mods seem to be uploading sucessfully while gradle is crashing and reporting that it failed during publication.

> Task :fabric:publishCurseforge FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fabric:publishCurseforge'.
> A failure occurred while executing me.modmuss50.mpp.platforms.curseforge.Curseforge$UploadWorkAction
   > Request failed, status: 400 message: Error in field `metadata`:
     * Invalid type. Expected Array but got Null. Path 'gameVersions', line 1, position 135.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

As you can see by the below screenshots, the mod did indeed publish successfully to both modrinth and curseforge. image image


See here for my gradle task setup

modmuss50 commented 1 year ago

Please try 0.3.2. Thanks.

ApexModder commented 1 year ago

ok that fixed that issue but.... now we have a new issue, it wants an array of length 1 minimum

> Task :fabric:publishCurseforge FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fabric:publishCurseforge'.
> A failure occurred while executing me.modmuss50.mpp.platforms.curseforge.Curseforge$UploadWorkAction
   > Request failed, status: 400 message: Error in field `metadata`:
     * Array item count 0 is less than minimum count of 1. Path 'gameVersions', line 1, position 132.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.