Following up on a previous question (https://kotlinlang.slack.com/archives/C0922A726/p1614689220294100) , every time I execute a Kotlin test in Intellij Idea, with or without code modifications, the IDE seems to rebuild the project the test lives in. The rebuild process takes over 30 seconds, even if the project is quite small (2.6GHZ MacBook pro, 32Gb ram). Any idea how to speed up the process?
c
CLOVIS
03/02/2021, 6:15 PM
I think there's an option to run the tests without Gradle (maybe search “test runner” in the settings?). However, I don't think it's a good idea (if you have a preprocessor/compiler plugin, that's not going to be picked up, ...). It's surprising that your build takes 30 seconds, it's almost instant for me (less than 3 seconds) for normal test builds.
CLOVIS
03/02/2021, 6:17 PM
Maybe the problem lies in your Gradle config, not in IDEA. Do you do anything specific in there? Are you sure your run configuration runs
test
, and not
clean test
?
c
crummy
03/02/2021, 6:53 PM
is your gradle updated?
l
Luciano
03/02/2021, 7:23 PM
@CLOVIS yes, I'm running the tests without Gradle (see my original thread)
Luciano
03/02/2021, 7:28 PM
ok, I think I have found the problem:
Luciano
03/02/2021, 7:28 PM
gradle.png
Luciano
03/02/2021, 7:28 PM
If I use for both Build and Test, Idea, the test execution is much faster