google / google/protobuf-gradle-plugin

Android testFixtures cause DuplicateRelativeFileException in 0.10.0

Open
#812 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
1.8k
Forks
288
PR merge metrics
No merged PRs in 30d

Description

In version 0.10.0

Enabling testFixtures on a module with
```
android {
testFixtures {
enable = true
}
}
```

will result in .proto files in the main sourceSet to be processed twice, once when compiling main and once when compiling the testFixture.

Depending on both the module and the testFixture (such as for tests) will then fail to merge resources since there are duplicate .proto resource files as well as duplicate generated sources.

Contributor guide

Open the contributing guide

Research direction

Start with the Android testFixtures configuration shown in the issue and reproduce the failure in version 0.10.0. Trace how .proto files from the main sourceSet are processed for both main and testFixture, then verify that depending on both modules no longer produces duplicate resources or generated sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.