How to get list of change but not compiled file in given project
I have to find files which are changed but not compiled in my java project. I have used below code for that,
List<String> changedFiles = BuildManager.getInstance().getFilesChangedSinceLastCompilation(Project);
But its not work properly. for gradle and mevan projects, its return null. Can any one help me with different way.
Please sign in to leave a comment.
Hi Kghkumara,
> But its not work properly.
Depends on how to define "properly". This method returns the list of files that will definitely be sent to compilation on the next build invocation. This collection is created basing on VFS events. After some changes to project settings and/or structure the gathered data may be invalidated. In general, there is no way to obtain the exact list of files that are going to be compiled after you invoke the "Build" action. This is because the final analysis is done by the build process and the actual list of compiled files depends on many factors: compilation scope, results of previous compilations, number of builders registered (some plugins may register their custom build tasks) etc.