Skip to content

Turn the IntelliJ plugin's searchable options off with the platform plugin's own switch - #776

Merged
lagergren merged 1 commit into
masterfrom
lagergren/intellij-searchable-options-2.20
Nov 17, 2026
Merged

lagergren merged 1 commit into
masterfrom
lagergren/intellij-searchable-options-2.20

Conversation

@lagergren

Copy link
Copy Markdown
Contributor

Problem

Since #770 bumped the IntelliJ Platform Gradle Plugin from 2.19.0 to 2.20.1, the XTC IntelliJ plugin no longer builds when the lang build is included:

A problem was found with the configuration of task ':lang:intellij-plugin:prepareJarSearchableOptions' (type 'PrepareJarSearchableOptionsTask').
  Input file does not exist
  Type 'org.jetbrains.intellij.platform.gradle.tasks.PrepareJarSearchableOptionsTask' property 'inputDirectory' specifies directory '.../lang/intellij-plugin/build/tmp/buildSearchableOptions' which doesn't exist

lang/intellij-plugin/build.gradle.kts turns searchable options off by disabling the buildSearchableOptions task. 2.20.0 "route[s] task outputs to dedicated buildDirectory locations in ... BuildSearchableOptionsTask, PrepareJarSearchableOptionsTask ... eliminating dependencies on task temporaryDir" (changelog). Gradle created a task's temporaryDir whenever it was asked for, so before 2.20 the directory existed even with the task disabled. Now only buildSearchableOptions creates it.

Master's CI builds with includeBuildLang=false, so it did not catch this. #693's CI, which includes lang, did.

Fix

Set the platform plugin's own switch, intellijPlatform { buildSearchableOptions = ... }, from the same -Plsp.buildSearchableOptions property. It makes the plugin skip buildSearchableOptions, prepareJarSearchableOptions and jarSearchableOptions together. The property's declaration moves above the intellijPlatform block that now reads it. -Plsp.buildSearchableOptions=true still turns them on.

Validation

./gradlew :lang:intellij-plugin:buildPlugin :lang:intellij-plugin:test -PincludeBuildLang=true -PincludeBuildAttachLang=true: the three searchable-options tasks are SKIPPED, buildPlugin succeeds, and the plugin's 29 tests pass with 0 skipped. The same change on #693 passes its 261 IntelliJ plugin tests.

…lugin's own switch

The build turned searchable options off by disabling the buildSearchableOptions task. Since
IntelliJ Platform Gradle Plugin 2.20.0 (master has 2.20.1 since #770), prepareJarSearchableOptions
reads a directory under build/ that only buildSearchableOptions creates; before, it read that
task's temporaryDir, which Gradle creates when it is asked for. With the task disabled, every build
of the plugin failed:

    A problem was found with the configuration of task ':lang:intellij-plugin:prepareJarSearchableOptions'
    (type 'PrepareJarSearchableOptionsTask'). Input file does not exist: property 'inputDirectory'
    specifies directory '.../lang/intellij-plugin/build/tmp/buildSearchableOptions' which doesn't exist

Master's CI builds without the lang build (includeBuildLang=false), so it did not see this.

intellijPlatform.buildSearchableOptions, set from the same -Plsp.buildSearchableOptions property,
makes the platform plugin skip buildSearchableOptions, prepareJarSearchableOptions and
jarSearchableOptions together. The property's declaration moves above the intellijPlatform block
that now reads it.

Validated: :lang:intellij-plugin:buildPlugin with those three tasks SKIPPED, and
:lang:intellij-plugin:test, 261 tests, 0 failures, 0 skipped.
@lagergren
lagergren merged commit 9044d2a into master Nov 17, 2026
5 checks passed
@lagergren
lagergren deleted the lagergren/intellij-searchable-options-2.20 branch November 17, 2026 09:53
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.

2 participants