Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds an automatic module name, that is, used as module name when Skript is on the modulepath on Java 9+.
If the jar is not modular (does not contain module-info.class) and does not have a
Automatic-Module-Name
entry on META-INF/MANIFEST.MF, then the module name is determined by file name.Publishing non modular artifacts (not containing module-info.class) that also doesn't contain
Automatic-Module-Name
to any repository and using them as libraries on projects is discouraged, and will most likely cause a warning to be thrown.The filename based module name is normally
Skript
on releases published in GitHub Releases, but people can alter them and name it whatever they want.Adding an
Automatic-Module-Name
will break the current modular projects that requiring Skript via its module name derived from file name (i.e.requires Skript;
in module-info.java), because in this PR I usedch.njol.skript
as module name, so the correct code should berequires ch.njol.skript;
after this PR. We can doAutomatic-Module-Name: Skript
to not break anything and just make it not dependant on file name, but for naming conventions it should bech.njol.skript
.Note that, this will not change anything on < Java 9 or even Java 9+, on non modular projects.
Target Minecraft Versions: any
Requirements: none
Related Issues: none