java-module-dependencies icon indicating copy to clipboard operation
java-module-dependencies copied to clipboard

Improve project dependency calculation

Open jjohannes opened this issue 3 years ago • 0 comments

Currently we guess the complete module name of other modules (source sets in other subprojects) in the same build:

https://github.com/jjohannes/java-module-dependencies/blob/bb1b089bde9185827541d5271aaf40207b75b79b/src/main/java/de/jjohannes/gradle/moduledependencies/JavaModuleDependenciesPlugin.java#L169-L171

That is why currently all module names need to correspond to the project name and have the same prefix (if any). Ideally, we would know the real module names from the module-info.java files of the projects. For that however, we need to share this info between all projects before we do dependency analysis. Maybe this could be done during configuration time by storing this information in an Extension on the root project or in a build service. When the actual dependencies are calculated in withDependencies { ... } al projects should be configured and the information should be available then.

jjohannes avatar May 09 '22 07:05 jjohannes