Notification of changed files during a continuous build

Is there any way to get gradle to tell me which files have changed when I’m running a task with --continuous?

I see that it outputs the changed files to the console, but I would like to use that list of files.

My use case is that I’m attempting to implement live reload, using tiny-lr. Whenever there is a change to the input files of a task, I would like to tell the tiny-lr server which files have changed.

1 Like

I think what you could do is implement your run task as an incremental task:
https://docs.gradle.org/current/userguide/custom_tasks.html#sec:implementing_an_incremental_task

Where the files that you care to reload are considered the sources to your run task. Then you’ll get a list of changed/deleted/added files that you can base your reload on.

@raymanoz Did you have success on that? How do you achieved it? I need the same.