-
Notifications
You must be signed in to change notification settings - Fork 274
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
Resolving MPP dependencies - Could not resolve all files for configuration ':protomodule:compileProtoPath' - Cannot choose between the following variants #391
Comments
Related to change made in #366. https://youtrack.jetbrains.com/issue/KT-31641#focus=streamItem-27-3698024.0-0 sounds to be likely the cause of this issue.
|
But based on ljacomet's comment here gradle/gradle#6389 (comment) is this not the same consumer issue that the kapt suffered from as well as the ben-manes/gradle-versions-plugin#334 issue? |
I was able to work around this issue by adding the following to my configurations.forEach {
if (it.name.toLowerCase().contains("proto")) {
it.attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, "java-runtime"))
}
} This is adapted from this suggestion that was more specific to using Square's wire implementation of gRPC, but in searching around for solutions to this issue I'm seeing a lot of related variant selection ambiguity issues. Hopefully the snippet above will help figure out how to update this plugin. |
It worked like a charm |
There was a build problem with dependencies. OkHttp uses okio and there were additional attributes missing. More details: google/protobuf-gradle-plugin#391
FYI, someone from the Gradle team had a quick look at this issue in this plugin and here's his summary: gradle/gradle#12126 (comment) |
I worked around this by depending on the older 0.8.10 version of protobuf-gradle-plugin. 0.8.14 error |
From gradle/gradle#12126 (comment), the
|
- Dropwizard 3.0.23 -> 2.0.24 - Dropwizard Metrics 4.2.2 -> 4.2.3 - Jackson 2.12.3 -> 2.12.4 - Jetty 9.4.42 -> 9.4.23 - GraphQL-Java 16.2 -> 17.1 - gRPC-Java 1.38.1 -> 1.39.0 - protobuf-java 3.12.0 -> 3.17.2 - protobuf-gradle-plugin 0.8.13 -> 0.8.17 - Kotlin 1.5.10 -> 1.5.21 - kotlinx-coroutines-core 1.5.0 -> 1.5.1 - Logback 1.2.3 -> 1.2.5 - Micrometer 1.7.1 -> 1.7.2 - Netty 4.1.65 -> 4.1.66 - tcnative-boringssl-static 2.0.39 -> 2.0.40 - transport-native-io_uring 0.0.5 -> 0.0.8 - java-jwt 3.16.0 -> 3.18.1 - Reactor 3.4.7 -> 3.4.9 - RESTeasy 4.6.1 -> 4.7.1 - RxJava 3.0.13 -> 3.1.0 - scala-collection-compat 2.4.4 -> 2.5.0 - ScalaPB 0.11.4 -> 0.11.5 - ScalaPB json4s 0.11.1 -> 0.12.0 - SLF4J 1.7.31 -> 1.7.32 - Spring 5.3.8 -> 5.3.9 - Spring Boot 2.5.2 -> 2.5.3 - ZooKeeper 3.6.2 -> 3.6.3 - Build - Checkstyle 8.43 -> 8.45.1 - Error Prone 2.7.1 -> 2.8.1 - Eureka 1.10.15 -> 1.10.16 - graphql-dgs-client4.3.1 -> 4.5.0 - groovy-xml 3.0.5 -> 3.0.8 - jmh 1.32 -> 1.33 - jsoup 1.13.1 -> 1.14.1 - MUnit 0.7.26 -> 0.7.28 - Proguard 7.1.0 -> 7.1.1 - Reactor gRPC 1.0.1 -> 1.1.0 - reactor-kotlin-extensions 1.1.3 -> 1.1.4 - Shaded - copmletable-futures 0.3.4 -> 0.3.5 - Miscellaneous - Add Brotli's license - Add a workaround for a configuration error of gradle-proto-plugin - google/protobuf-gradle-plugin#391
- Curator 5.1.0 -> 5.2.0 - Dropwizard 2.0.23 -> 2.0.24 - Dropwizard Metrics 4.2.2 -> 4.2.3 - Jackson 2.12.3 -> 2.12.4 - Jetty 9.4.42 -> 9.4.23 - GraphQL-Java 16.2 -> 17.1 - gRPC-Java 1.38.1 -> 1.40.0 - protobuf-java 3.12.0 -> 3.17.2 - protobuf-gradle-plugin 0.8.13 -> 0.8.17 - Kotlin 1.5.10 -> 1.5.21 - kotlinx-coroutines-core 1.5.0 -> 1.5.1 - Logback 1.2.3 -> 1.2.5 - Micrometer 1.7.1 -> 1.7.3 - Netty 4.1.65 -> 4.1.67 - tcnative-boringssl-static 2.0.39 -> 2.0.40 - transport-native-io_uring 0.0.5 -> 0.0.8 - java-jwt 3.16.0 -> 3.18.1 - Reactor 3.4.7 -> 3.4.9 - RESTeasy 4.6.1 -> 4.7.1 - RxJava 3.0.13 -> 3.1.0 - scala-collection-compat 2.4.4 -> 2.5.0 - ScalaPB 0.11.4 -> 0.11.5 - ScalaPB json4s 0.11.1 -> 0.12.0 - SLF4J 1.7.31 -> 1.7.32 - Spring 5.3.8 -> 5.3.9 - Spring Boot 2.5.2 -> 2.5.3 - ZooKeeper 3.6.2 -> 3.6.3 - Build - Checkstyle 8.43 -> 8.45.1 - Error Prone 2.7.1 -> 2.8.1 - Eureka 1.10.15 -> 1.10.16 - Finagle 21.6.0 -> 21.8.0 - Gradle 7.1 -> 7.1.1 - graphql-dgs-client 4.3.1 -> 4.5.1 - graphql-kotlin 4.1.1 -> 5.0.0-alpha.3 - groovy-xml 3.0.5 -> 3.0.8 - jmh 1.32 -> 1.33 - jsoup 1.13.1 -> 1.14.2 - MUnit 0.7.26 -> 0.7.28 - Proguard 7.1.0 -> 7.1.1 - Reactor gRPC 1.0.1 -> 1.1.0 - reactor-kotlin-extensions 1.1.3 -> 1.1.4 - Shaded - copmletable-futures 0.3.4 -> 0.3.5 - Miscellaneous - Add a missing Brotli's license - Add a workaround for a configuration error of gradle-proto-plugin - google/protobuf-gradle-plugin#391
Given a simple multi module project as can be seen here https://github.com/olamelin/protobuf-gradle-plugin-issue the protomodule:extractIncludeProto fails with the following stack trace
The issue happens when there is a dependency on a Kotlin MPP project as the com.squareup.okio:okio:2.4.3 is.
It looks to be the same that existed in Kapt but has been resolved in version 1.3.60 https://youtrack.jetbrains.com/issue/KT-31641
The text was updated successfully, but these errors were encountered: