JetBrains / gradle-grammar-kit-plugin

Gradle plugin for generating lexers (with JFlex) and BNF parsers (with Grammar-Kit) for IntelliJ language plugins
Apache License 2.0
88 stars 17 forks source link

Support for IntelliJ Plugin 2.0 #202

Closed sczerwinski closed 3 weeks ago

sczerwinski commented 3 weeks ago

Is your feature request related to a problem? Please describe.

After updating to IntelliJ Platform Gradle Plugin 2.0, I'm getting errors when trying to build a project using Gradle Grammar-Kit Plugin (GenerateParserTask):

> Error: Unable to initialize main class org.intellij.grammar.Main
  Caused by: java.lang.NoClassDefFoundError: com/intellij/openapi/util/KeyedExtensionCollector

Describe the solution you'd like I would like to be able to use Gradle Grammar-Kit Plugin with IntelliJ Platform Gradle Plugin 2.0.

Describe alternatives you've considered A good alternative would be a clear migration guide to IntelliJ Platform Gradle Plugin 2.0 for projects using Gradle Grammar-Kit Plugin.

Additional context PR producing the error: https://github.com/sczerwinski/valve-data-format-intellij-plugin/actions/runs/10982794164/job/30491470876?pr=75

YannCebron commented 3 weeks ago

The minimum IDE version to build against when using IntelliJ Platform Gradle Plugin (2.x) is 2022.<<3>>, but you're using platformVersion = 2022.2.5. See https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html#requirements. The build works as expected when changing to platformVersion=2022.3.

Please also upgrade Gradle 8.3 to more recent version and keep it up-to-date.

PS: It is not necessary to specify every single IDE version for pluginVerifierIdeVersions if you use recommended() covering all IDEs matching given since/until build range, see https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-pluginVerification-ides