Skip to content

Add the runtime-dir option to pluginVerifier #339

@opticyclic

Description

@opticyclic

Problem
I get the following error when running the runPluginVerifier task imported in my own plugin project

Exception in thread "main" java.lang.IllegalArgumentException: JAVA_HOME is not specified
    at com.jetbrains.pluginverifier.options.OptionsParser.getJdkPath(OptionsParser.kt:76)
    at com.jetbrains.pluginverifier.options.OptionsParser.createIdeDescriptor(OptionsParser.kt:66)
    at com.jetbrains.pluginverifier.tasks.checkPlugin.CheckPluginParamsBuilder.build(CheckPluginParamsBuilder.kt:38)
    at com.jetbrains.pluginverifier.tasks.checkPlugin.CheckPluginParamsBuilder.build(CheckPluginParamsBuilder.kt:23)
    at com.jetbrains.pluginverifier.PluginVerifierMain.main(PluginVerifierMain.kt:124)

This is due to a combination of how IDEA is started without the JAVA_HOME variable and how the PluginVerifier doesn't do a full search of the environment for a JDK.

https://github.com/JetBrains/intellij-plugin-verifier/issues/35

Suggested solution
Could you add the option to pass the -runtime-dir option to the task
https://github.com/FWDekker/intellij-randomness/blob/master/gradle/scripts/verifier.gradle#L151-L162

Alternative solutions
I could make sure that JAVA_HOME was set everywhere I wanted to use this.

Additional context
I also would like the ability to specify a different runtime than my current one so I can test different variations in a build server.

I am also aware that this is mainly for your project and not primarily designed for use by other people via an import.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions