JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
879 stars 97 forks source link

Android Studios Build Variants Support #314

Open justincamp404 opened 4 years ago

justincamp404 commented 4 years ago

Greetings and thanks for the excellent plugin.

I see that there's support for multiple projects. Is there any support for android studios "build variants" in the same project?

For example, I have an app with "production" and "staging" variants which point to different servers. I download the schema DSLs for both of these and put them in separate directories. Is there a way to

jimkyndemeyer commented 4 years ago

Hi Justin.

Thanks for using the plugin.

Based on my current knowledge, Android Studio is its own distribution based on top of the shared IntelliJ platform. This likely means that this plugin can't reference the build variants code.

I think an additional plugin would be needed, one that's built specifically against Android Studio. The GraphQL plugin would then have to be extended with a new extension point that the new Android Studio plugin could utilize based on something like a build variant listener.

Given other projects and priorities I don't think I'll find time to work on this, but I would happily take a PR which adds the necessary extension points that would make it possible.

If you're up for giving it a shot, the starting point is https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html

Best regards, Jim.

justincamp404 commented 4 years ago

Hi Jim, I kind of figured it would be something like that. Thanks for the info!

I might take a stab at it at some point in the relatively near future, but right now I'm swamped @ work.

Cheers! Justin