apollo-kotlin fails when using refreshVersions
See original GitHub issue- [ ✔️ ] I have read the guidelines for submitting issues
🐛 Describe the bug
Apollo checks to make sure all versions are equal: https://github.com/apollographql/apollo-kotlin/blob/a1536a269ffe5896f1b5290e55bd361e2d398861/apollo-gradle-plugin/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt#L167
This check fails when using refreshVersions.
This can be worked around by using versionFor
in the dependencies.
⚠️ Current behavior
This results in the generateApolloSources
task giving the following error:
Apollo: All apollo versions should be the same. Found:
[3.1.0, _]
✅ Expected behavior
The version check to succeed.
💣 Steps to reproduce
Configuration:
buildscript {
...
dependencies {
...
classpath("com.apollographql.apollo3:apollo-gradle-plugin:_")
}
}
plugins {
...
id("com.apollographql.apollo3")
}
dependencies {
implementation("com.apollographql.apollo3:apollo-runtime:_")
implementation("com.apollographql.apollo3:apollo-adapters:_")
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
I am facing this problem after upgrading to version 3 3 2 Us
I am facing this problem after upgrading to version 3 3 2 Users subhamtyagi gradle caches modules 2 files 2 1 com apollographql...
Read more >apollo-kotlin/CHANGELOG.md at main - GitHub
Apollo Kotlin can be configured to work with multiple services and have the package ... Fix item wrongly removed from http cache when...
Read more >Migrating to Apollo Kotlin 3.0 - Apollo GraphQL Docs
This page describes the most important changes, along with how to migrate an existing project from Apollo Android 2.x to Apollo Kotlin 3.x....
Read more >How to build a GraphQL Gateway with Spring Boot and Kotlin
GraphQL-java-kickstart libraries. Use the source Luke. Note that I'm using gradle refreshVersions to make it easy to keep the project up-to-date ...
Read more >Setup - gradle refreshVersions - GitHub Pages
Gradle 6.8+ is required because this plugin relies on Kotlin 1.4. ... If the command fails ... you probably want to use refreshVersions...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 3.2.0 🎉.
Thinking more about this, I’m having second thoughts… Resolving a configuration isn’t something trivial and I’m too afraid of potential side effects. Also, if for some reason, another unrelated dependency fails to resolve, this will show up with “checkApolloVersions” in the error, which could be misleading.
~I’m ok disabling the check if
de.fayard.refreshVersions
is applied (or maybe just filtering out ‘'). What do you think?~ Edit: never mind, this is what you said in your comment above. I’m just going to filter out '’ as a pragmatic first step. For disabling the check, see comment above.