Combining Java Modules and Gradle for elegant project structures

2024 talk

JavaLand 2024, April 2024

Modularization and Dependency Management are controversial topics for many Java developers. You can hardly get past them, but they often seem to create problems rather than solving them. In typical Java projects today, Modularization and Dependency Management are mainly done through the build tool of choice (usually Gradle or Maven).

Since Java 9, you can describe Modules and their relationships directly in the Java language by using the Java Module System (JPMS). At first glance, this does not make it any easier: What do I use if Java and build tool both want to be used to describe my Modules? Do I gain anything besides redundancy?

In this talk I present a project setup that combines the strengths of the Java Module System and Gradle. This leads to a cleaner and more maintainable Java project structure. This setup has been proven in practice as it was successfully introduced into multiple Java projects over the past two years.

Talk Website | Slides and Example


Contact
Dr. Jendrik Johannes
Grönlander Damm 35 A
22145 Hamburg
Germany
jendrik@onepiece.software
+49 178 5363745
Ust-IdNr: DE343201228