I have two resource folders that I include during test.
target/
+---generated/
| +---WebContent/
| | +---some files
| +---ProgramNames.properties
+---WDR/
| +---Some folders which has files
excepted_target/
+---generated/
| +---WebContent/
| | +---some files
| +---ProgramNames.properties
+---WDR/
| +---Some folders which has files
The problem is that the folders target and excepted_target are not preserved in resources/test. This is a problem because the two folders are used to compare one with the other. The folder that comes last in the build file overwrites the previous folder.
No that is not what i’m trying.
I want Gradle to add the three folders conf, target and expected_target to build/resources/test/. Not just the contents of the three folders.
Yes, you are correct. I did not think about it that way. ProcessResources does indeed extend Copy. In addiiton my example code was still wrong as it would have dropped the folder names.
My first sugegstion of putting everything below a top folder would still work happily, and would be my suggestion. However if your folders are top-level, the following works (after having tested it).
processTestResources {
from projectDir, {
include 'conf/**'
// etc.
}
All of the other stuff will get copied and you will get your folders you wanted.