Gradle Build/Cache Issues in Cursor - Tests Work Fine in IntelliJ

Hi everyone,
I’m experiencing an issue while running tests in Cursor (based on VSCode). I usually code in Cursor but test in IntelliJ because tests often fail or behave inconsistently in Cursor. The same code works perfectly in IntelliJ without any issues.

It feels like Cursor is not detecting code changes properly or is relying on cached builds, even though I have java.autobuild.enabled set to true.

Here are the steps I’ve tried so far:

  1. Ensured gradle clean test works manually.
  2. Verified Gradle Daemon settings and tried stopping it.
  3. Checked launch.json and task configurations.
  4. Confirmed that IntelliJ consistently picks up the latest changes without issues.

Does Cursor have a specific caching mechanism for builds that I might be overlooking? Or is there any configuration I should adjust to ensure test classes refresh properly?

I’ve noticed that intellij is compiling the build/java/test folder while Cursor isn’t. Could this be something in the config?

Any advice would be much appreciated.

Hey, Cursor itself would not have any mechanism for this, but I cannot speak on any extensions you may have installed that interact with the gradle testing functionality!

Some other users may be able to jump in and help here!