it happened to me more than once that i create some new source files but forget to add one of them. the tests pass fine on my computer, but fail in the build server. to prevent these embarrassing moments, i’d like to ask gradle to print some warning when it finds a source /resource file which is used in the tests, but is unversioned. is there any way to do it?
asafdav2 (asaf david) #1
Peter_Niederwieser (Peter Niederwieser) #2
This isn’t provided out-of-the-box, but you can write a task that, depending on your version control system, executes a command that checks for unversioned files. With Groovy, executing a command can be as simple as ‘“git stat”.execute()’.