diff --git a/src/main/java/org/javamodularity/moduleplugin/internal/CompileModuleInfoHelper.java b/src/main/java/org/javamodularity/moduleplugin/internal/CompileModuleInfoHelper.java index 4bfac65..1eb396f 100644 --- a/src/main/java/org/javamodularity/moduleplugin/internal/CompileModuleInfoHelper.java +++ b/src/main/java/org/javamodularity/moduleplugin/internal/CompileModuleInfoHelper.java @@ -37,6 +37,7 @@ private static Stream dependentCompileModuleInfoJavaTaskStream(Project pro .filter(dependency -> dependency instanceof ProjectDependency) .map(dependency -> ((ProjectDependency) dependency).getDependencyProject().getTasks()) .map(tasks -> tasks.findByName(CompileModuleOptions.COMPILE_MODULE_INFO_TASK_NAME)) - .filter(Objects::nonNull); + .filter(Objects::nonNull) + .filter(task -> task.getProject() != project); } }