I tried to migrate a large plugin to a V2 plugin descriptor to support split-mode. This turned into a Gradle nightmare and I’m now stuck with unit tests.
The main build uses pluginModule(project(":my-current-module")) to put the v2 modules of subprojects into lib/modules/... of the plugin.zip. Executing runIde is working mostly.
In unit tests of a submodule I have a src/test/resources/META-INF/plugin.xml file declaring the basic content modules to provide a v2 descriptor to tests:
<idea-plugin>
<id>dev.j-a.swift</id>
<content>
<!-- my.current.module.xml also declares dependencies,
e.g. on my.own.module.dependency -->
<module name="my.current.module" loading="required"/>
<module name="my.own.module.dependency" loading="required"/>
</content>
</idea-plugin>
How can I tell the Gradle build to put the sub-project .jar files into the test sandbox at lib/modules/my.own.module.dependency.jar and so on?
Tests are failing because the modules are not loaded because of the missing modules and unresolved dependencies.
How could I fix this to allow me to run unit tests with a v2 descriptor?
Thanks!
| Tool | Version |
|---|---|
| Gradle | 9.3.1 |
| IntelliJ Platform Gradle Plugin | 2.11.0 |