Use the mlExportResources task.
mlExportResources
https://github.com/marklogic/ml-gradle/wiki/Exporting-resources