Repository navigation
Modularise for complete compatibility with JPMS. - #356
Open
brett-smith wants to merge 2 commits into
Open
brett-smith wants to merge 2 commits into
brett-smith wants to merge 2 commits into
Conversation
…a 9. * Removes dependency on jutils and uses `ServiceLoader` for plugins instead. * Rename all child module packages that clash with the core `net.java.games.input` (split packages are not possible in JPMS). This implies all plugin classnames have changed. Also affects system property names used for plugin configuration. * Adds module-info to all modules. * Reformat copyright headers on a number of classes or the strict Javadoc settings cause build failures in version later than JInput was developed with.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
JInput is currently impossible to use with a fully and correctly modularised application.
This is necessarily a significant patch. It touches just about every single class, renaming the package used by all plugins to allow JInput to be fully and correctly modularised (JPMS) without having "Split Packages". This is not simply adding
Automatic-Module-Nameto theMANIFEST.MF,every module will have amodule-info.java.These changes also required all native sources to be adjusted (because with JNI package names are embedded in function names).
jutilsusage has been removed. The "plugin" functionality is now provided by Javas built-inServiceLoaderwhich works with JPMS. Even if jutils was modularised, it still would not work correctly as a plugin system due to differences in how classloaders in a modular world work. Maybe that is fixable, but I don't see anything it can do that ServiceLoader can't.All of this also means the minimum Java version is now 9. I did try to implement this change as an MRJAR to maintain Java 8 compatibility, but there were other problems taking this route (lots of tooling with MRJARs is still not great for example).
This would fix #60.
If there is any interest in this PR at all, I have some pre-built artifacts on the new Maven Central snapshots repository. They are built using this PR, but then a 2nd patch applied on top to change all the artifact names. The builds should contain 64 bit intel binaries for Linux , Windows and Mac OS. Note however I have only tested them on Linux.
and for example ...