Skip to content

Migrate build to IntelliJ Platform Gradle Plugin 2.x (Gradle 9, IDE 2026.1)#36

Open
thomasrepnik wants to merge 4 commits into
masterfrom
chore/gradle9-intellij-platform-plugin-2x
Open

Migrate build to IntelliJ Platform Gradle Plugin 2.x (Gradle 9, IDE 2026.1)#36
thomasrepnik wants to merge 4 commits into
masterfrom
chore/gradle9-intellij-platform-plugin-2x

Conversation

@thomasrepnik

Copy link
Copy Markdown
Owner

Summary

./gradlew build was broken after upgrading the toolchain: org.jetbrains.intellij 1.x (every version, incl. 1.17.4) depends on a Gradle-internal class (DefaultArtifactPublicationSet) that Gradle 9 removed, and 1.x also cannot build against IDE targets ≥ 2024.2. This PR completes the upgrade by migrating to JetBrains' successor plugin.

Gradle wrapper 9.6.1 (first commit)

  • Wrapper jar and gradlew/gradlew.bat scripts regenerated via ./gradlew wrapper so they match the 9.6.1 properties file (the manual properties-only edit had left them at 8.4).

Build migration (second commit)

  • org.jetbrains.intellij 1.17.4 → org.jetbrains.intellij.platform 2.11.0
  • IDE dependency via the new dependencies { intellijPlatform { ... } } block using the unified intellijIdea '2026.1.4' distribution (IC is no longer published since 2025.3) + bundledPlugin 'Git4Idea'
  • patchPluginXml/runPluginVerifier blocks replaced by intellijPlatform { pluginConfiguration { ideaVersion { sinceBuild = '261' } } } and pluginVerification { ides { recommended() } }
  • Java target 17 → 21 (required for IDE targets ≥ 2024.2)
  • Plugin version 1.4.1 → 1.4.2; .intellijPlatform cache dir gitignored

Compatibility note: sinceBuild = 261 means users on IDEs older than 2026.1 stop receiving updates (intentional).

No production or test source changes were needed — everything compiles cleanly against the 2026.1 platform.

Test plan

  • ./gradlew build — compiles, all 133 tests pass on Gradle 9.6.1 / JDK 21
  • ./gradlew buildPlugin — produces commit-prefix-plugin-1.4.2.zip
  • ./gradlew verifyPluginCompatible against IU-261.26222.65 (2026.1) and IU-262.8665.176 (2026.2 EAP), dynamic-plugin eligible

🤖 Generated with Claude Code

thomasrepnik and others added 4 commits July 15, 2026 21:54
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The org.jetbrains.intellij 1.x plugin is EOL: it uses Gradle-internal
API removed in Gradle 9 and cannot build against IDE targets >= 2024.2.
Replace it with org.jetbrains.intellij.platform 2.x using the unified
intellijIdea distribution (IC is no longer published since 2025.3),
raise the Java target to 21 as required by modern IDE targets, and
declare sinceBuild 261. Ignore the plugin's .intellijPlatform cache dir.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Lombok 1.18.34 crashes javac 25 with ExceptionInInitializerError during
compileTestJava. A toolchain makes Gradle compile with a discovered
JDK 21 regardless of the JVM that launches the build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- IntelliJ Platform Gradle Plugin 2.11.0 -> 2.18.1
- JUnit Jupiter/Platform 5.10.3/1.10.3 -> 6.1.2 (unified versioning)
- Hamcrest 2.2 -> 3.0
- Lombok 1.18.34 -> 1.18.46 (adds JDK 25 javac support)
- Replace toolchain pin with source/target compatibility 21 so the
  build runs on the default JDK 25 while emitting Java 21 bytecode

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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