intellij-platform-gradle-plugin
intellij-platform-gradle-plugin copied to clipboard
Add Defaults For Publishing To EAP Channel
I am currently confused as to how to effectively use an EAP channel for my plugin https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009478380-How-Do-I-Publish-To-An-EAP-Channel-
The docs suggest some popular names but they also imply that you can use whatever you want.
After searching GitHub for examples I found this https://github.com/cashapp/sqldelight/blob/3154c4122bd1ab75216ef91d14b82484db4a41e2/sqldelight-idea-plugin/build.gradle#L33-L44
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
publishPlugin {
token = getPluginToken()
channels(isReleaseBuild() ? 'Stable' : 'EAP')
}
I feel like this could be added to the core plugin by setting a property.
e.g. useEapForSanpshots = true
This would not only be simpler, it would also help standardise the channel names.
e.g. above it says "EAP" but in the the docs it uses lowercase and uses "eap"
I feel like this could be added to the core plugin by setting a property.
I believe the plugin shouldn't force any particular releasing process.
Publishing SNAPSHOT version to the plugin repository is questionable by itself. SNAPSHOTS has particular semantics that is not supported by plugin repository, as it doesn't allow using the same version for several builds.
This would not only be simpler, it would also help standardise the channel names.
There is no aim to standardise the channel name. Each maintainer is free to use any name that comply to their release process.
Putting sensible defaults or options doesn't force anything.
As an end user I don't want to have bother configuring extra plugin repos for every plugin just to get the EAP releases.
As a plugin developer I don't want to have to come up with a name for my EAP releases if there is already a sensible name defined.
If I wanted to choose a different name then I would still be free to change it.
The fact that publishing SNAPSHOTs is questionable and perhaps not supported also demonstrates why these defaults would be useful.
People are already doing this because they don't know how it is supposed to work.
All this suggestion would do is make the plugin easier to work with for end users and developers alike.
There is a sensible default – empty channel name.
Right now you're trying to apply your own approach to manage plugins and their releases for everyone. Not everybody uses EAP, not everybody needs channels. Most of the users don't even know what EAP means.
You may want to create a separate wrapper-plugin for gradle-intellij-plugin
that will support the flow you like. I'd like to keep the plugin as abstract as possible and allow users to build any process they want on top of it.
The fact that publishing SNAPSHOTs is questionable and perhaps not supported also demonstrates why these defaults would be useful.
Not really, I believe SNAPSHOT semantics has nothing to do with predefined channel names. It won't be possible to update several SNAPSHOT versions no matter how the channel is named.
People are already doing this because they don't know how it is supposed to work.
Right, but this plugin doesn't introduce the SNAPSHOT term, it's pure Maven thing.
I'm not applying my approach to managing plugins. Beta and EAP are the naming conventions that IDEA uses for releases.
I am releasing a plugin for IDEA so I would like to use the same conventions that IDEA does.
You are right that not everyone uses EAP, however, some people do and some people release their plugins using an eap channel to match the conventions that IDEA uses.
The reason I am looking at this is because an end user specifically asked me for an EAP release.
So even though not everyone uses it, some people use it which is the use case we are discussing.
BTW: I wasn't suggesting simply copying and pasting the code from the other repo and using the SNAPSHOT logic. Just something like that.
e.g. you could have isBeta = true or isEAP = true and that would set default channel names.
If you wanted to use a channel called "canary" or "alpha" you could just ignore these properties and set the channel name to be "canary" or "alpha" and it wouldn't affect you and the plugin wouldn't be forcing anything on to anyone but at the same time it would be making it easier to use for people who are happy with the default naming convention.
The docs have already listed eap as a popular channel name and IDEA has a setting that gives you a choice of Stable, Beta or EAP, so having this as an option in the plugin makes it nice and easy to work with and links up with the docs and the rest of IDEA.
e.g. you could have isBeta = true or isEAP = true and that would set default channel names.
Ok, let's consider this option. I'm really sorry, but I still cannot understand how it helps users. To me, it looks like the result of that change is that instead of writing this:
publishPlugin {
channels = project.ext.channels
}
you'll need to write this
intellij {
isEap = project.ext.isEap
}
It doesn't seem to make it shorter or easier to discover but it complicates the API and introduces one more boolean flag to learn and to support. I've already added a bunch of flags like sameSinceUntilBuild
and I do think it was a mistake.
I think I could introduce a special EAP_CHANNEL
constant with EAP
value, so you'll get the standardized publishPlugins { channels(EAP_CHANNEL) }
but it doesn't look discoverable too.
Btw, JetBrains plugins that are published along with IDEA EAP builds don't use EAP
-convention. They are published in the default channel with build numbers restrictions.
There are some nice defaults in https://github.com/JetBrains/intellij-platform-plugin-template Also regarding eap channel publishing
Which I think makes sense that it has a more opinionated approach then this plugin.