FabricMC / fabricmc.net

The source code and content for https://fabricmc.net/
MIT License
51 stars 28 forks source link

Template mod generator: Allow selection of license other than CC0 #24

Open triphora opened 1 year ago

triphora commented 1 year ago

In my experience as a moderator for Modrinth, one of the most common rejection reasons is invalid metadata. Most commonly it relates to licensing, where they will select one license on Modrinth but still have the default CC0-1.0 license in their LICENSE file and in the fabric.mod.json.

If this template generator is going to eventually become the recommended way of creating a new mod, the one improvement I would like to see the most is to not assume that everyone is going to use CC0. Instead, the user should be prompted to select their own license, like how the MinecraftDev plugin does it: image Or how Modrinth does it: image

Ideally there would also be a link to one of the many useful guides for choosing a license, such as GitHub's choosealicense.com or Modrinth's licensing guide.

modmuss50 commented 1 year ago

Yes, this is something I want to do, thanks for the links.

I found some raw license data here: https://github.com/github/choosealicense.com/tree/gh-pages/_licenses I dont think we want to present all of these options to the user so we should just display a small subset? (Maybe the same as Modrinth).

I will also need to find a nice way to depend and parse this license data.

Some liceses may require a header in the code, is this something we should worry about? If so it may require using a 3rd party gradle plugin such as spotless to enforce it?

modmuss50 commented 1 year ago

After some more digging I found: https://github.com/spdx/license-list-data/blob/main/json/details/Apache-2.0.json this data includes a standardLicenseHeaderTemplate key that seems to only be present for licenses that need one 👍

modmuss50 commented 1 year ago

I made a bit of progress on this (still need to make it work), let me know what you think:

Screenshot 2023-01-05 at 01 18 50

List of licenses: (Same as modrinth)

Screenshot 2023-01-05 at 01 18 22
triphora commented 1 year ago

The CC licenses (besides CC0) are only there for resource packs, they shouldn't really be used for code. Looks great otherwise!

modmuss50 commented 1 year ago

Ah, good to know. I will remove them. Many thanks 👍

TechPro424 commented 1 year ago

Modrinth's licensing guide says that GPL and AGPL licenses are incompatible with MC

Typically, when a copyleft license is wanted, the GPL-3.0 or AGPL-3.0 would be used. However, these licenses are incompatible if linking into Minecraft, due to an issue with the difference between proprietary and free software outlined by these licenses.

So they might need to be removed

Also, would it be possible to add the LGPL Version 3.0 or later license? I don't see it in the screenshot

modmuss50 commented 1 year ago

Since last night I have made some changes and cut the list of liceses right down. I think keeping it simple is best.

Screenshot 2023-01-05 at 11 49 18

See the PR here with a few TODO's/questions https://github.com/FabricMC/fabricmc.net/pull/25