override fun exec()

in src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildSearchableOptionsTask.kt [58:76]


    override fun exec() {
        if (showPaidPluginWarning.get()) {
            log.warn(
                """
                Due to IDE limitations, it is impossible to run the IDE in headless mode to collect searchable options for a paid plugin.
                As paid plugins require providing a valid license and presenting a UI dialog, it is impossible to handle such a case, and the task will fail.
                Please consider disabling the task. 
                See: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-buildSearchableOptions
                """.trimIndent()
            )
        }

        validateIntelliJPlatformVersion()

        workingDir = platformPath.toFile()
        args = args + listOf("traverseUI", outputDirectory.asPath.safePathString, "true")

        super.exec()
    }