google / google/protobuf-gradle-plugin

ProtobufExtract task not UP-TO-DATE when it should be

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

Description

ProtobufExtract task is not UP-TO-DATE when irrelevant input directories are added or removed.

See example below from AndroidX build:

```
task :datastore:datastore-preferences-proto:extractIncludeTestProto not UP-TO-DATE. It was out-of-date because:
[Input property 'inputProtoFiles' file $OUT_DIR/androidx/datastore/datastore-preferences-proto/build/classes/kotlin/main/META-INF has been removed., Input property 'inputProtoFiles' file $OUT_DIR/androidx/datastore/datastore-preferences-proto/build/classes/java/main/androidx has been removed., Input property 'inputProtoFiles' file $OUT_DIR/androidx/datastore/datastore-preferences-proto/build/classes/kotlin/main/androidx has been removed.]
```

This is surprising because `ProtobufExtract.getInputProtoFiles()` [should only contain proto files](https://github.com/google/protobuf-gradle-plugin/blob/278f21b03074dcd63589801333db7615d3578745/src/main/groovy/com/google/protobuf/gradle/ProtobufExtract.groovy#L74).

protobuf-gradle-plugin version: 0.9.0

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.