intellij-platform-gradle-plugin
intellij-platform-gradle-plugin copied to clipboard
1.x: show instructions to use 2.x when targeting 242
Describe the need of your request
Targeting 242 requires IntelliJ Platform Gradle Plugin 2.x trying to use 1.x will fail with unclear errors
Proposed solution
Show clear instructions and fail the build
Alternatives you've considered
No response
Additional context
No response
Imo, a better approach would be to not have such an aggressive cutover to the new version in the first place. I see several problems:
Confusing messaging
The documentation has the following disconnected statements:
- IntelliJ Platform Gradle Plugin 2.x (Beta) (currently in Early Access Preview) is going to replace this plugin in the future. Please note that production usage is currently not recommended yet.
- Gradle: Minimum Plugin Versions
- When targeting 2024.2 or later, IntelliJ Platform Gradle Plugin 2.x (Beta) is required.
- When targeting 2022.3 or later, Gradle IntelliJ Plugin version 1.10.1 or higher is required (current: 1.17.3)
Analysis
- It's an early access preview, but also tagged as beta
- It's not recommended for production yet, but it will be required to target the next production release.
Open questions
- What about
2024.2makes it so different that it can't be supported in1.x? Did something dramatically change for2024.2? - When will
2.xbe recommended for production use?- Why is the only path for supporting
2024.2to use an early access preview that isn't recommended for production yet?
- Why is the only path for supporting
- Is
gradle-intellij-plugin(1.x) now considered abandonware? There was never any kind of announcement warning of this if so and the above requirements seem to suggest this.
Targeting 242 requires IntelliJ Platform Gradle Plugin 2.x trying to use 1.x will fail with unclear errors
Agreed. It took me two and a half hours to figure it out. The problem is that I didn't even think to upgrade to newer version of 1.x 😕 I've just stumbled upon the 2.x requirement during the ordeal (#1638). Meaning that additional instructions in the output of 1.x wouldn't have helped me, unfortunately.
a better approach would be to not have such an aggressive cutover to the new version in the first place
I second these suggestions. It indeed isn't easy to migrate to the new version, I've already spent quite some time to migrate the plugin and there are still glitches here and there (like https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1637) that prevent me from fully porting the existing logic. I'm afraid that many plugins will get no 2024.2-compatible updates, or will only get updates long after 2024.2 is released.
Also, AFAICS as for now the main benefit of the new version is somewhat easier setup of subprojects that need to depend on IntelliJ but don't constitute the plugins themselves (i.e. are only dependencies of the plugin). Other than that, the experience is similar (or worse, due to numerous papercut errors).
Please stick to the topic of this issue, a simple, unavoidable technical requirement to use 2.x when targeting 24.2 releases. Your feedback on 2.x is welcome in separate GH issues or join the Slack channel.
Lemme open a separate issue for tracking the high-level concerns
Fixed in https://github.com/JetBrains/intellij-platform-gradle-plugin/releases/tag/v1.17.4