I have a build-convention plugin in kts where I de...
# apollo-kotlin
j
I have a build-convention plugin in kts where I depend on Apollo
Copy code
implementation("com.apollographql.apollo3:apollo-gradle-plugin:3.2.2")
but I fail to use any type from Apollo plugin (ApolloExtension, etc.), no autocompletion, class is not "visible". Any idea why? I use convention plugin and configure other tools (like Detekt) and it works like a charm.
b
I must admit I haven't tried it before. Apart from completion from the IDE, is it working when building?
e
even if you depend on a plugin, it's not going to affect the Gradle model unless it's also applied. e.g. you need both
dependencies { implementation(apollo) }
in your plugin's build.gradle and
plugins { apollo }
in your convention plugin
j
Thank you both. Yeah, I believe it will be rather my gradle setup issue, yet I'm applying it and it is working for my other plugins...
Copy code
implementation("com.apollographql.apollo3:apollo-gradle-plugin:${libs.versions.apolloVersion.get()}")
Is in my plugin's build.gradle.kts.
b
what about with the full class name
com.apollographql.apollo3.gradle.api.ApolloExtension
?
j
Shame on me, it seems that the fqn works, even I believed that I've tried that. Thx!
b
oh that's cool 👍 I guess it was AS/IJ not finding the import 🙂