Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
triphora opened this issue Jan 4, 2023 · 7 comments · May be fixed by #25
Open

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

triphora opened this issue Jan 4, 2023 · 7 comments · May be fixed by #25
Labels
enhancement New feature or request template-generator

Comments

@triphora
Copy link

triphora commented Jan 4, 2023

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
Copy link
Member

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 modmuss50 added the enhancement New feature or request label Jan 5, 2023
@modmuss50
Copy link
Member

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
Copy link
Member

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
Copy link
Author

triphora commented Jan 5, 2023

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

@modmuss50
Copy link
Member

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

@TechPro424
Copy link

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 modmuss50 linked a pull request Jan 5, 2023 that will close this issue
@modmuss50
Copy link
Member

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 #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request template-generator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants