yavi icon indicating copy to clipboard operation
yavi copied to clipboard

Support module-info.java

Open making opened this issue 3 years ago • 2 comments

https://github.com/moditect/moditect

making avatar Jul 14 '21 13:07 making

There are several options to go forward with this. It depends on the choices you want to make.

Do you want to stay on JDK 8?

  • In that case, adding an Automatic Module Name entry in your manifest (as done in #171) is sufficient for now, imho.

Do you want to upgrade to JDK 11?

  • Adding a module-info.java is the easiest way forward, but you'll probably lose JDK 8 compatibility.
  • If you'd like to keep JDK 8 compatibility, a multi-release jar might be a solution.

I do not have experience with the Moditect Maven plugin, but at first sight it seems especially handy to add module-info files to jar files you do not control. Although, you can use this plugin in your codebase as well, but I think it is easier to add the module-info file directly.

Another consideration you have to make: Which packages do you want to export and which ones need to stay internal? This might imply that you need to move some functionality.

duponter avatar Oct 12 '21 19:10 duponter

Thanks for the write up!

Do you want to stay on JDK 8?

Yes. I will support Java 8 until YAVI 2.0.

At the moment, there are few packages that I want to be internal. I thought I'd have module-info for the future, but as you say, Automatic Module Name should be sufficient for now. Leave this issue open.

making avatar Oct 13 '21 01:10 making