JetBrains / intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs

Home Page:https://plugins.jetbrains.com/docs/intellij/gradle-prerequisites.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.0 - resolve LATEST-EAP-SNAPSHOT

jonathanlermitage opened this issue · comments

Describe the need of your request

With gradle plugin v1, I was using intellij { version.set("IC-LATEST-EAP-SNAPSHOT") }
With gradle plugin v2, I am using dependencies { intellijPlatform { intellijIdeaCommunity("...") } }
but, what should I use as intellijIdeaCommunity's parameter? I tried LATEST-EAP-SNAPSHOT but it doesn't work.
I am looking at https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-faq.html#how-to-check-the-latest-available-eap-release -> should I really compute the latest EAP snapshot version string by myself? Is there a helper for that? Thx.

Proposed solution

Allow { intellijPlatform { intellijIdeaCommunity("LATEST-EAP-SNAPSHOT") } } or something similar, as in plugin v1.

Alternatives you've considered

No response

Additional context

No response

Note, in general building against LATEST-EAP-SNAPSHOT is not recommended, as it can have unpredictable results (and you'll usually want to target a specific minimum EAP build).

I don't want to build plugins for EAP IDEs, I want to test them with EAP builds, by running gradlew runIde.
Some developers are using EAP IDEs, and I want to fix issues asap. Also, testing against EAP IDEs helps me to fix issues before the availability of the next IDE stable build.
Finally, I don't want to find specific EAP version strings by myself (this is time-consuming and boring), I simply want the latest version, automatically. I know they can be unpredictable, but I am doing this since many years, and it helps me a lot. I have a very good experience with that. I used to test my plugins with a minimum stable IDE version, the latest stable IDE version, and the latest EAP.

There's no need to build against some EAP version, it's sufficient to configure it to run against that EAP build.

To give more context, I used to test my plugin (by testing, I mean running gradlew runIde) with:

  • a minimal stable IDE version. This version never changes, so it's hard-coded. This is what I am using in my since-build property.
  • the latest stable IDE version. I have a script that finds this version string. I'm doing this because I don't want a until-build property. I don't want to publish new releases just for updating this tag. But, this is another story.
  • the latest EAP. I explained why.

Also, the LATEST-EAP-SNAPSHOT property was available in plugin v1. I don't understand why it has been removed. It was useful for some plugin developers.

This is already possible. To build your plugin with a specific IntelliJ Platform but run with another, for testing purposes, you have to define a custom task with:

val runLatestEapIde by tasks.registering(CustomRunIdeTask::class) {
    version = "LATEST-EAP-SNAPSHOT"
}

Note that, by default, we use now JetBrains CDN where only released IDEs are hosted.
To switch to IJ Maven Repository where snapshots are present, add this line to the gradle.properties.

org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false

This property name as well as the CDN/Maven resolution may soon change.