gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

IDE plugins should be more uniform in their architecture #979

Open lacasseio opened 5 years ago

lacasseio commented 5 years ago

The core concept that repeats between IDEs are:

For each IDE, we should focus on delegating to Gradle, whatever that means for the IDE in question. It also means the IDE should have the least configuration as possible. Any behaviour configuration should come out from the Gradle model. If something must be configured in the IDE, it should be a configuration on the Gradle model as well with a clear use case.

Users can be allowed to compose new IDE workspace and project according to a set of simple public API meaning they can't just configure every single detail of an IDE using the APIs. This means we may be opinionated through those APIs. For example, Intellisense for Xcode is built another target. There may be other ways to do this, but that is an implementation detail that we use, the users can't change it or configure it directly and it may change in the future to some other techniques. Another example is Visual Studio fake an NMake project. This may change in the future so the details of this should be an implementation detail and not exposed to the users.

Having a stronger opinion on how IDE integration work with Gradle will allow for more uniform support and more cross-cutting features.

Other points we should make here is the importance of the public API:

lacasseio commented 5 years ago

I feel like we should be more aggressive in what we make internal and implementation detail. For example, I would say that all IDE types that aren't used for configuring the extension (that users can use) should be internal. It forces the IDE plugins to be more closed down and focus on bridging the IDE and Gradle instead of allowing every possibility. What is the general feeling about this?

lacasseio commented 5 years ago

We already have IdeWorkspace. I would move with incremental PRs that introduce IdeWorkspace to the idea and eclipse plugins followed by moving toward Introducing the other generic concept to all plugins at the same time aka IdeProject, IdeSourceSet, IdeBuildConfiguration, IdeDebugConfiguration. Each implementation would type those generic concepts to the specific naming of the IDE. I would also have a wave of moving types to internal ones to make the public API spread smaller within a couple release (for native) and next major release (for Java).