Why shouldn't I have circular dependencies in my gradle build?

76 Views Asked by At

Is there a performance impact with having circular dependencies? With Gradle?

1

There are 1 best solutions below

0
Dr-Bracket On BEST ANSWER

Dependencies in gradle are discouraged to avoid confusion. When it comes to circular dependencies, you should keep the following in mind:

  • Gradle does not support circular dependencies within individual configurations
  • Gradle can support two or more configurations depending on each other, unless
    • There is a compile or implementation circular dependency

In general, these restrictions limit any use case of circular dependencies, and it's highly recommended to refactor them out of your project instead.