Skip to content

Commit

Permalink
Handle duplicated module names in 'extra-module-info' bridge
Browse files Browse the repository at this point in the history
Fixes #91
  • Loading branch information
jjohannes committed Feb 22, 2024
1 parent 16d198c commit e31f082
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ExtraJavaModuleInfoBridge {
public static void autoRegisterPatchedModuleMappings(Project project, JavaModuleDependenciesExtension javaModuleDependencies) {
ExtraJavaModuleInfoPluginExtension extraJavaModuleInfo = project.getExtensions().getByType(ExtraJavaModuleInfoPluginExtension.class);
javaModuleDependencies.getModuleNameToGA().putAll(extraJavaModuleInfo.getModuleSpecs().map(
moduleSpecs -> moduleSpecs.entrySet().stream().collect(Collectors.toMap(ExtraJavaModuleInfoBridge::moduleNameKey, Map.Entry::getKey))));
moduleSpecs -> moduleSpecs.entrySet().stream().collect(Collectors.toMap(ExtraJavaModuleInfoBridge::moduleNameKey, Map.Entry::getKey, (a, b) -> b))));
}

private static String moduleNameKey(Map.Entry<String, ModuleSpec> entry) {
Expand Down

0 comments on commit e31f082

Please sign in to comment.