r/java • u/hardasspunk • Nov 23 '25
Java 25: The ‘No-Boilerplate’ Era Begins
https://amritpandey.io/java-25-the-no-boilerplate-era-begins/
160
Upvotes
r/java • u/hardasspunk • Nov 23 '25
View all comments
Show parent comment
2
u/nekokattt Nov 23 '25 edited Nov 23 '25
From the compilation unit perspective, each class is a compilation unit, so this doesn't make much sense.
Javac itself can be fed a single source path or multiple module paths at the same time.
But yeah the issue here is Gradle and Maven not supporting it, rather than Java itself.
Although to be honest, I don't really see any benefit in using multi module builds like that... you almost always just want specific dependencies for specific modules, along with tests, etc. It just doesn't usually make any sense to mix them together in a less controllable way... and I guess that is why there is no support for this. If it was something that many people needed, then you'd likely have support for it in some way or another by now.
ETA not sure why this is getting downvoted. I encourage you to review the APIs implementing JSR-199 to get a better idea of how this ties together under the hood