modmuss50 / mod-publish-plugin

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

Additional files should maybe use file names rather than gradle display name property #19

Closed ApexModder closed 3 weeks ago

ApexModder commented 10 months ago

When uploading multiple files to CurseForge they are all given the exact same display name, this makes additional files hard to identify.

In the below screenshot i have uploaded 5 additional jar files, as our mod is setup to be modular.

image

These are a collection of sources jars aswell as individual modual jars for players to change which modules are installed.

They are as follows

As you can see it is hard to identify which of these files is which, without digging further into the file and looking at the file name property.


This is not a problem when it comes to Modrinth as they just list the additional files using the raw file name.

![image](https://github.com/modmuss50/mod-publish-plugin/assets/29412632/f6532aa9-3168-4c4f-a68a-c6be86a83c62)
modmuss50 commented 9 months ago

Good idea, I guess the ideal option would be to also provide an API to allow this name to be changed. Not too sure how feasible/easy that would be however.

ApexModder commented 9 months ago

Would it be possible to merge implement my band-aid fix until some api is implemented?

This would nullify the display name and let curseforge internal handle the naming, which defaults to the uploaded file name. Not the best but its better than everything having the exact same name.

I ask as updates/releases for our mod shave been put on hold until this is fixed, as our most popular mod has gone a more modular route and knowing which file is which is kind of an important thing (for advanced installs at least).


As for an api, im unsure if this can be done but i think something like so would be nice, it not only lets you set the display name for file but also any other properties too (cause of course curseforge lets you set basicly every property per file uploaded).

but yeah, i dont know gradle plugins all too well so unsure if this would actually be doable, but it would be a nice spec for setting per file properties

publishMods {
    // ...
    curseforge {
        // ...
        additionalFile(remapSourcesJar.archiveFile) {
            // Set the display name for this specific file
            // resolves to "[Fabric/Sources] MyMod - v1.0.0"
            displayName = "[Fabric/Sources] ${project.archivesBaseName} - v${project.version}"

            // Allow setting other properties for this file too
            changelog = 'Some changelog specific to sources'
        }
    }
}
modmuss50 commented 9 months ago

@ApexModder yeah, I am quite happy to merge your fix now (can you make it a PR?).

And yeah, something along those lines is what im thinking, ill try and find some time to figure that out.

modmuss50 commented 9 months ago

I ended up creating a PR from your branch and releasing as 0.3.6

ApexModder commented 9 months ago

Can confirm latest update did fix this issue for me, See my release here and the gradle here

modmuss50 commented 3 weeks ago

This was fixed.