Reputation: 108
I have a multi project build
main-module
-> api
-> pets
-> gateway
Execution failed for task ':api:jar'.
java.io.IOException: Unable to delete file: \main-module\api\build\libs\api.jar
How do I resolve this? Thanks.
Upvotes: 1
Views: 1550
Reputation: 28099
It seems there's something wrong with your build. The api:jar
task should be considered as UP-TO-DATE at step 4 (since step 3 has already built it and nothing has changed) but it seems that it's trying to build the jar again. Most likely cause is a task input (a file) has changed
I'd guess that some of your task inputs/outputs are incorrect. Or maybe you generate a file with the current date/time in it as part of your build process?. You can try running gradle with --info
to see why api:jar
task is not UP-TO-DATE for step 4
Upvotes: 0