unbroken-dome / gradle-testsets-plugin

A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests).
MIT License
230 stars 50 forks source link

4.1.0 broke IntelliJ IDEA support #138

Closed KrohnicDev closed 1 year ago

KrohnicDev commented 1 year ago

Hi, we have a typical test setup with unit tests, integration tests and some test utilities used by both test modules. After 4.1.0 upgrade IDEA doesn't recognize the shared util classes anymore.

Gradle itself still works properly, so we are able to build, run and test the project with Gradle. Just IDEA's features are broken. We used git bisect to verify that first broken commit was indeed the plugin upgrade from 4.0.0 to 4.1.0.

Here's our build plugin configuration:

// build.gradle.kts
testSets {
    val testUtils = "testUtils"
    libraries {
        register(testUtils)
    }
    unitTest {
        imports(testUtils)
    }
    register("integrationTest") {
        imports(testUtils)
    }
}

Some metadata to help with analysis:

dgeissl commented 1 year ago

This will most likely be a side effect of https://youtrack.jetbrains.com/issue/IDEA-321592 which is breaking all non "unit-test" SourceSet configurations in the 2023 versions so far.

I know the ticket is resolved now, but the release is not out yet.

KrohnicDev commented 1 year ago

Thanks, might be related indeed. Interestingly there is no problem with Gradle v7 and TestSets v4.0.0 even with current IDEA version. But let's hope that it will get resolved by IDEA release.

KrohnicDev commented 1 year ago

Tested with IDEA 2023.3 EAP version, and imports work as expected. I will close this issue for now.