Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy hidden resource files in gradle?

Tags:

gradle

ant

I am using gradle Java plugin. I see that gradle does not copy hidden (starting with .) files from test/resources directory to build/resources/test directory. Ant has an option to use defaultExcludes = 'no' to force copy of all files. How do I do that with gradle?

like image 281
codefx Avatar asked Apr 08 '15 01:04

codefx


1 Answers

It is not an issue with every hidden resource file but only the ones present here are excluded by default.

You can do the following:

org.apache.tools.ant.DirectoryScanner.removeDefaultExclude("**/.gitignore")

For more details, refer this Gradle issue

like image 118
Paras Narang Avatar answered Nov 02 '22 16:11

Paras Narang