Modifying resources from JavaExec task

Hi,
I’m are converting a large project from ant to gradle, and am now in need of some help.

In our setup we have a JavaExec task that will launch our webapp in an admin mode. In this mode we can edit values of text fields in the app in different localizations, and the admin mode will save them to the correct resource files when done.
This worked fine in the ant setup (and to some extend also with gradle), but as gradle is coping the resources from src/main/resources to build/resources/main the changes don’t show up in version control and it seems to others as the feature is broken.

What would be the correct way of handling this? Add the src/main/resources to the classpath, or could I have a finalizer task for the JavaExec? but what if I keep the app running?

The build is a multiproject build and the resources of cause comes from multiple projects.

-Aske

I’d probably

  1. put these editable files in a separate folder (eg src/main/admin-resources)
  2. add the new directory to the runtimeClasspath
  3. in the jar task, add the new directory to the jar

Thanks, makes sense to split it out to a separate resource folder, even in the transition period where we’re maintaining both build systems.