Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
12.2
Description
When running {{debug.single }}project action, on a test in gradle project, the following is executed:
./gradlew --configure-on-demand --rerun-tasks -x check test --tests com.example1.Demo22Test
Note the --rerun-tasks parameter, which will recompile classes etc, even though gradle thinks they're up-to-date. Naturally something has to be done, since otherwise Gradle won't even run the tests. As noted in https://www.stefan-oehme.com/stop-rerunning-tests, Gradle should be aware of test input changes and will decide whether to actually run the test or not.
Since this is a direct user instruction (from the IDE), we may use different approach: run cleanTest task before the test, which will invalidate test result from the build cache.
lkishalmi – what's your opinion on the above improvement ? Is it stable / gradle way ? It seems to work on my machine, but I lack experience with the build system details.
Attachments
Issue Links
- links to