Make test task for kotlin incremental in Gradle?

236 views Asked by At

I would like to make my test task incremental, but I noticed that it looks for files in java instead of kotlin:

Task ':test' is not up-to-date because:
  Task.upToDateWhen is false.
file or directory '/path/to/my/project/build/classes/java/test', not found

I have the following plugins enabled:

plugins {
    kotlin("jvm") version "1.6.20"
    kotlin("plugin.spring") version "1.6.20"
}

How I can configure test task to pick up /path/to/my/project/build/classes/kotlin/test instead of java?

1

There are 1 answers

0
pixel On BEST ANSWER

It looks like IntelliJ IDEA sets Task.upToDateWhen to false. In console it works fine.

There is a bug for that: https://youtrack.jetbrains.com/issue/IDEA-240111