Skip to content

Gradle update#58

Open
FalsePattern wants to merge 4 commits intormordechay:mainfrom
FalsePattern:gradle-update
Open

Gradle update#58
FalsePattern wants to merge 4 commits intormordechay:mainfrom
FalsePattern:gradle-update

Conversation

@FalsePattern
Copy link
Copy Markdown
Contributor

@FalsePattern FalsePattern commented Jul 1, 2025

Gradle 9.0 is releasing soon, with the configuration cache enabled by default, so I updated the plugin's buildscript to be compatible with it, along with some other minor tweaks.
The changes are:

  • Added an explicit gradle wrapper. This way the build is independent from the system-installed gradle version
  • Translated the build.gradle file from groovy to kotlin, as modern Intellij versions have better highlighting/completion support for it
  • Reimplemented the generateGrammarClean task to be config cache compatible by breaking out each generation step (lexer, highlight lexer, parser) into a separate sub-task with its own dedicated generation target directory. This way the source sets are not mixed, and changing one grammar does not require rebuilding the others.
  • Enabled the gradle configuration cache
  • Disabled the gradle kotlin stdlib dependency, because the kotlin stdlib is provided by the IDE. This is recommended by the plugin SDK documentation: https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
  • Migrated the intellij task configurations to the intellijPlatform {} project DSL. This is functionally equivalent, but the platform plugin has extra safety checks on these.
  • Added the plugin verifier, can be invoked with the verifyPlugin gradle task. This is the same verifier that they use on the marketplace.

- Converted groovy to kotlin
- Implemented grammar generation via gradle task, making them caching-compatible
- Added gradle configuration cache to make rebuilds significantly faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant