mikaelgrev / miglayout

Official MiG Layout for Swing, SWT and JavaFX
miglayout.com
423 stars 76 forks source link

Support Java Platform Module System (JPMS) #67

Open wimdeblauwe opened 5 years ago

wimdeblauwe commented 5 years ago

I am doing some tests with the JPMS and I noticed that MigLayout does not seem to support it at present.

Some articles that might be of help to know what should be done:

wimdeblauwe commented 5 years ago

It seems that adding this to my own module-info.java makes it possible to use MigLayout:

module myapplication {
    requires miglayout.core;
    requires miglayout.javafx;
}
tbee commented 5 years ago

These are automatic modules.

But I've modularized JFXtras, so doing the same for MigLayout should not be a problem. But that means we need to support a Java 9+ version. Since Java 12 is out, that may be prudent by now. Maybe v6.x?

On 9-7-2019 14:55, Wim Deblauwe wrote:

It seems that adding this to my own |module-info.java| makes it possible to use MigLayout:

|module myapplication { requires miglayout.core; requires miglayout.javafx; } |

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikaelgrev/miglayout/issues/67?email_source=notifications&email_token=AAK5BQSDFZCGYXWQRZBLO4LP6SDEVA5CNFSM4H7FB5I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZQFREA#issuecomment-509630608, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK5BQSHYCIHXWJWOOFNUILP6SDEVANCNFSM4H7FB5IQ.

wimdeblauwe commented 5 years ago

The automatic modules are ok for me, but it would be good to document the names of the modules so people can know what to put in the requires directive for each miglayout module.

mikaelgrev commented 5 years ago

I'm all for making a v6 of MigLayout which would be modularized. I haven´t myself needed modules yet though so if @tbee could do it that would be great.

tbee commented 5 years ago

I've created a separate branch (jpms) and started adding the module-info files; swing and javafx seem to be ok, but I'm running into troubles for swt, the native jars are not being resolved.

aalmiray commented 3 years ago

I can setup a branch and apply the https://github.com/moditect/moditect plugin. It may be the case that only core, swing, and javafx may be properly modularized (full modules) while the other JARs may use just the Automatic-Module-Name manifest entry to claim their respective com.miglayout.* module name instead of the auto generated name based on the JAR file name.