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

generateCommonMainServiceApolloSources error using v7.0.0-alpha07 of gradle plugin #2939

Closed
joreilly opened this issue Feb 18, 2021 · 3 comments

Comments

@joreilly
Copy link
Contributor

joreilly commented Feb 18, 2021

As this is using canary version of AS I understand that it may not be priority but just fyi that getting following error after updating to v7.0.0-alpha07 of gradle plugin....this is with use in Kotlin Multiplatform shared code (using v2.5.3 of apollo library)

Execution failed for task ':shared:generateCommonMainServiceApolloSources'.
> Could not initialize class com.apollographql.apollo.compiler.parser.introspection.IntrospectionSchema

This is after updating following project: https://github.com/joreilly/MortyComposeKMM

@martinbonnin
Copy link
Contributor

Thanks for sending this!

That looks really similar to #2886. My first guess would be that IntrospectionSchema fails to initialize because it depends on a recent okio version but AGP or other plugin put an older version in the Gradle classloaders.

Can you try to put classpath("com.apollographql.apollo:apollo-gradle-plugin:2.5.3") next to the AGP and other plugins in the root project so that dependency resolution can somehow know what version of okio to use?

@joreilly
Copy link
Contributor Author

@martinbonnin yes, just to confirm that it worked after doing that

@martinbonnin
Copy link
Contributor

Nice! I'm going to close this issue as this really is something with the Gradle classloaders.

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

No branches or pull requests

2 participants