palexdev / VirtualizedFX

GNU Lesser General Public License v3.0
46 stars 4 forks source link

Modular: add module-info #2

Closed AntoninHuaut closed 2 years ago

AntoninHuaut commented 2 years ago

Added the module-info file to make the project modular (and make MaterialFX compatible with the Java jdeps tool).

See https://github.com/palexdev/MaterialFX/issues/152

palexdev commented 2 years ago

@AntoninHuaut thank you very much! I was just working on that but I was having some issues. Did you try running the tests? Because in my IDE they fail to run

AntoninHuaut commented 2 years ago

Indeed sorry, I did not run the tests and they do not pass. I just tested by adding VirtualizedFX dependency in my application to see jdeps was working. I check and it's because the tests require more modules than the code itself:

However, I'm not a great expert about modularity in Java, I don't know how to manage without adding require only for tests. In addition, I took the syntax of the MaterialFX module-info for the name, but in lowercase it to make it compatible without change. However, you would have to change both by the package name from what I've seen I will try to learn more

AntoninHuaut commented 2 years ago

I updated the pull request, with the gradle-modules-plugin I force to use classpath (like before Java 9) instead of module path, seems to work, I don't know how clean it is

palexdev commented 2 years ago

@AntoninHuaut I thought so. My idea to fix it was to move tests to a separate module (just like the demo module for MaterialFX). However since your fix works I think I'll accept the PR, no matter how clean it is as long as it works, java modularity drives me crazy honestly. Ok, give me some time to review it, make some style changes, I'll public the new version as soon as possible, then update MaterialFX too Thank you!

palexdev commented 2 years ago

Tested, works perfectly, merge and soon publish version 11.2.5