JetBrains / intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
https://plugins.jetbrains.com/docs/intellij/gradle-prerequisites.html
Apache License 2.0
1.43k stars 270 forks source link

Custom Plugins Repo not used for RunPluginVerifierTask #580

Open mvilliger opened 3 years ago

mvilliger commented 3 years ago

I have an IntelliJ plugin which depends on other company internal plugins. The dependencies are configured in the plugin.xml as follows:

<idea-plugin>
  ...
  <depends>com.intellij.modules.java</depends>
  <depends>CustomPlugin1</depends>
  <depends>CustomPlugin2</depends>
  ...
</idea-plugin>

The two custom plugins are deployed to a company internal custom plugin repository.

Accordingly I have a build.gradle.kts file that lists these plugins along with the custom plugin URL:

 ...
plugins {
    ...
    id("org.jetbrains.intellij") version "0.6.5"
    ...
}

intellij {
    version = "..."
    pluginsRepo {
        custom("url")
    }

    setPlugins("java", "CustomPlugin1:1.0.0", "CustomPlugin2:3.0.1")

    tasks.withType<RunPluginVerifierTask> {
        setIdeVersions(listOf("IU-2020.2.4", "IU-2020.3"))
        failureLevel = FailureLevel.ALL
    }
}
 ...

When running the gradle task like "gradle clean buildPlugin runPluginVerifier -s -i" it fails to find the custom plugin dependencies. The log shows the following messages and the build fails:

2020-12-21T15:30:05 [main] INFO  verification - Finished 1 of 2 verifications (in 2.6 s): IU-203.5981.155 against MyPlugin: 2 missing mandatory dependencies. 2 possible compatibility problems, some of which may be caused by missing dependency
2020-12-21T15:30:05 [main] INFO  verification - Finished 2 of 2 verifications (in 2.7 s): IU-202.8194.7   against MyPlugin: 2 missing mandatory dependencies. 2 possible compatibility problems, some of which may be caused by missing dependency
Plugin MyPlugin against IU-203.5981.155: 2 missing mandatory dependencies. 2 possible compatibility problems, some of which may be caused by missing dependency
Missing dependencies: 
    CustomPlugin1: Plugin CustomPlugin1 is not available in Marketplace https://plugins.jetbrains.com
    CustomPlugin2: Plugin CustomPlugin2 is not available in Marketplace https://plugins.jetbrains.com

Is my custom pluginsRepo configuration wrong? Or is it necessary to pass this information over to the pluginVerifier somehow?

Thanks

hsz commented 3 years ago

@mvilliger, unfortunately, for now, it is not possible to set a third-party repository as a source for the dependencies. However, you can run the verifier in offline mode and provide all dependencies in front.

mvilliger commented 3 years ago

Ah ok. Thank you very much for the fast response!

hsz commented 3 years ago

The issue to track: https://youtrack.jetbrains.com/issue/MP-3343