we want to compile a project once and then copy all the content in the directory to other Computers, however to directories with different paths.
The Project was compiled in C:/build
Copy all content to another computer to C:/workspace
In that case everything has to be recompiled unfortunately because gradle thinks
Deleting stale output file: C:\workspace..\build\resources\main
Output property 'destinationDir' file C:\build\..\build\resources\main has been removed
All files have obviously been copied and are present, but gradle only considers the full path which doesn’t make sense to me and then proceeds to delete the outputs. Can gradle check the output property with a relative path instead of absolute?
It is not supported to copy the whole directory to a different location and expecting things to work.
Some parts of the Gradle cache are supported to be copied as documented at Understanding dependency resolution but that’s it.
Compilation can be cached though and if you leverage a remote build cache, you can even reuse compilation results and other things on multiple machines.