gradleliferayliferay-7.4

Liferay 7.4 circular dependency detected by gradle


I want to use multiple projects in Liferay 7.4 and am facing a circular dependency issue:

When we add these dependencies in build.gradle it shows a circular dependency error in the build.

How do I fix this?


Solution

  • The typical way to resolve circular dependencies is to extract a third module, typically an API module with just interfaces (maybe some utility classes), and have both existing modules depend on it rather than on each other.

    Another (less popular) option is to merge both projects into one. Quite brute force, but technically solves the same problem.