Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate proto file in third party libraries #686

Open
CoderYellow opened this issue Mar 25, 2023 · 2 comments
Open

Duplicate proto file in third party libraries #686

CoderYellow opened this issue Mar 25, 2023 · 2 comments

Comments

@CoderYellow
Copy link

Execution failed for task ':extractIncludeProto'.
> Entry google/api/annotations.proto is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

you can reporduce this error by including this dependency

implementation("org.apache.arrow:flight-sql-jdbc-driver:11.0.0")

Some thirty party libraries define the same proto files multiple times, I can see here include all proto files from thirty party jars. Is there a way to exclude specific jar for proto extract task.

@tinmegali-connected
Copy link

Same issue here, on a different library

> Entry google/protobuf/any.proto is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Is there any mitigation strategy to resolve it?

@hb0
Copy link

hb0 commented Apr 20, 2023

This happens since the upgrade from version 0.8.19 to 9.0.0.

From the release notes:

Added generated code to java SourceSet instead of only adding it to JavaCompile and related tasks. This should cause tasks like sourcesJar and javadoc to now include the generated code. You may need to exclude the generated code from linters

./gradlew clean :sourcesJar fails

(We're using a workaround, which might be related, not sure.)

Haven't had time to look further into this myself, anyone found a solution already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants