google / google/protobuf-gradle-plugin

Circular dependency error on multi-project builds with same project names

Open
#330 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Groovy
Stars
1.8k
Forks
288
PR merge metrics
No merged PRs in 30d

Description

Imagine a project with the following graph:
```
Root:
- ServiceAPIs:
- Example - API of Example service
- protobuf definition files here
- Services:
- Example - service API implementation
- compile dependency on :ServiceAPIs:Example
```
When building :Services:Example project with protobuf-gradle, gradle reports circular dependency. Example circular dependency graph as reported by gradle:
```
Circular dependency between the following tasks:
:Services:Example:classes
\--- :Services:Example:compileJava
+--- :Services:Example:compileKotlin
| +--- :Services:Example:generateProto
| | \--- :Services:Example:extractIncludeProto
| | \--- :Services:Example:jar
| | +--- :Services:Example:classes (*)
| | +--- :Services:Example:compileKotlin (*)
| | \--- :Services:Example:inspectClassesForKotlinIC
| | \--- :Services:Example:classes (*)
| \--- :Services:Example:jar (*)
+--- :Services:Example:generateProto (*)
\--- :Services:Example:jar (*)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.