Adding a separate `integrationTest` task to a IntelliJ Platform Gradle Plugin 2.x

Hello! I’m working on upgrading a plugin from a the IntelliJ Platform Gradle Plugin 1.x to 2.x framework. I don’t otherwise deal with Gradle/Java/Kotlin/JVM work, so I apologize if the solution to my issue should be obvious.

In the 1.x version, I had a separate integrationTest task. I would like to keep the integration tests in a separate task (unless someone has arguments why all types of tests should be in the test task). The 2.x framework has a builtin test task. If I use the build.gradle.kts from the custom language plugin tutorial example and dump all my integration tests into the test module, my integration tests run fine. However, when I try to create a separate integrationTest test task (using something like tasks.register<Test>("integrationTest") { ...), within the integrationTest module, I’m having trouble getting the com.intellij module to resolve. That is, on an import like import com.intellij.psi.TokenType, I encounter Unresolved reference ‘intellij’. This is presumably because the integrationTest task is not getting all the same dependencies that the test task is.

I’m not certain how I should be approaching this. Is there a different special way to add additional test tasks to the intellijPlatform setup? Or should I be adding to the integrationTest task all the dependencies that the 2.x framework adds to the test task? How would I go about finding out what those dependencies are?

Thank you for your time!

Edit: I should note that what I’m labeling as “integration” here is lower level than some of the JetBrains documentation labels it. This set of tests is not testing the the plugin at runtime. It’s still testing how the different parts of the code related to the plugin work with each other, but the plugin is not being run in the IDE during these tests.

I’ve decided to just move the tests within the test module. Then have separate sub-modules within the test module for unit and integration tests.