cansik / artnet4j

Art-Net DMX over IP library for Java and Processing
GNU General Public License v3.0
95 stars 21 forks source link

Add module-info for java 9 modules #19

Open rynr opened 2 years ago

rynr commented 2 years ago

As a developer
I want to have a module definition
So that I can use artnet4j in a modular application

As this does not changes anything on the code itself, there's no need for any minor or major version update.

Additional information:
With Project Jigsaw, a modularization was introduced that makes a developer decide which parts of it's library can be used outside of the library. Utility classes so can be sealed from usage.
To use this, the libraries need a module definition explaining which packages can be used with the library and which other modules this library is using.
Having a module definition available allows to build a JRE only containing the really required classes for the application, which reduces classpath scanning and also removes unused classes from the classpath.

What needs to be done is to create a module-info.java to the src/main/java directory and define a module. There's also A Guide to Java 9 Modules.

cansik commented 2 years ago

As a developer you could open pull request. I think it's a good idea and I would be happy to merge this contribution.