confluentinc / confluentinc/kafka-tutorials

KStreams Serialization Format - duplicatesStrategy Error with Gradle 7

Open
#898 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
39
Forks
91
PR merge metrics
No merged PRs in 30d

Description

In the following tutorial, the use of Gradle 7 results in a failed build
* https://kafka-tutorials.confluent.io/changing-serialization-format/kstreams.html

```
joefeoccosmbp15:kstreams-serialization joe.feocco$ gradle --version

------------------------------------------------------------
Gradle 7.1.1
------------------------------------------------------------

joefeoccosmbp15:kstreams-serialization joe.feocco$ ./gradlew build
> Task :extractIncludeProto FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':extractIncludeProto'.
> Entry google/protobuf/any.proto is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.1.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
```

Building with Gradle 6 avoids the issue altogether.
```
joefeoccosmbp15:kstreams-serialization joe.feocco$ /usr/local/opt/gradle@6/bin/gradle wrapper
Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 15s
1 actionable task: 1 executed
joefeoccosmbp15:kstreams-serialization joe.feocco$ ./gradlew build

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 21s
16 actionable tasks: 16 executed
```

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.