When running gradle build from command line and manually terminating with Ctrl+Z, the .lock files, generated by gradle aren't removed. During the next build, I get a build failure with the following message:
.....
> Timeout waiting to lock artifact cache (...). It is currently in use by another Gradle instance.
Owner PID: ...
.....
When I kill the process and run build again, the message doesn't change. Even the process ID remains the same.
Is there a recommended way of stopping a gradle task from command line? Otherwise, is it possible to clean the hanging .lock files?