Live Stream: Merging IntelliJ Platform Gradle Plugin with Gradle Grammar Kit Plugin — what can possibly go wrong?

Hey, folks!

The Gradle Grammar Kit Plugin has served its purpose, but it’s not quite in the shape I want. Making it truly rock-solid would mean pulling in several approaches from the IntelliJ Platform Gradle Plugin anyway, so I’m going to try something: an experimental merge of the two.

My guess is that most of you who depend on the Gradle Grammar Kit Plugin are already using the IntelliJ Platform Gradle Plugin as well, so this should also lower the long-term maintenance burden.

Scope of work

  • Add two new tasks to the IntelliJ Platform Gradle Plugin: parseLexer and parseGrammar
  • Move those tasks into a dedicated sub-plugin: org.jetbrains.intellij.platform.grammarkit
  • Create a new sub-plugin that’s opt-in those tasks and necessary configurations
  • Make the new tasks use the currently targetted IntelliJ Platform
  • Add two dependency helpers to resolve org.jetbrains:grammar-kit and org.jetbrains.intellij.deps.jflex:jflex
  • Sunset the Gradle Grammar Kit Plugin :sunset:

Pros

  • One Gradle plugin for developing plugins for JetBrains IDEs
  • Lower maintenance cost
  • Better configuration cache support
  • Support for declaring repositories in settings.gradle.kts
  • Grammar Kit and JFlex dependencies configured via dependency helpers
  • Simpler setup (no grammarKit {} extension)

Cons

  • None that I can see :innocent:

I’ll be streaming this work live on Tuesday the 3rd at 9 AM CET on YouTube and Twitch.

Hop in, ask questions in chat, and let’s see how this development flow looks under the hood!

P.S. Follow and subscribe, yeah? :laughing:

2 Likes