Copy files from subprojects into my rootproject

I’ve been developing an automated test case suit (rootproject) in which I’m going to compose a lot of end-to-end tests (subprojects) of my company’s software.
Mostly os my subprojects use ‘java-application’ plugin also my rootProject, since I intend to run every end-to-end test in synchronous way.
This is what my project structure looks like:

org.myCompany.rootProject
|
|--org.myCompany.subProject0001
|  |
|  |-src/
|  | |
|  | |-dist/
|  | | |
|  | | |-README.MD
|  | | |-runSubProject0001.cmd
|  | |-main/
|  | |-test/
|  | 
|  |-build.gradle
|
|--org.myCompany.subProject0002
|  |
|  |-src/
|  | |
|  | |-dist/
|  | | |
|  | | |-README.MD
|  | | |-runSubProject0002.cmd
|  | |-main/
|  | |-test/
|  | 
|  |-build.gradle
|  .
|  . (goal is keeping going until subproject 1000+)
|  
|-build.gradle
|-settings.gradle

So what can I do to get README.MD and ‘runSubProject.cmd’ files from each subproject and copy into my rootproject (desired folder in my rootproject is ‘{rootProject}/build/distribution/{subProjectName}’) when I build it?

I was trying to write a task on my gradle.build on my rootproject in order make gradle iterate over each subproject and copy those files into my rootproject, but I have failed.

So this is what I did in my build.gradle from org.mycompany.rootProject and it worked:

task getArtifactsFromSubprojects {
    subprojects.each {
        if(it.getName().contains("cjv")){
            dependsOn it.getPath() + ':convertReadmeToPdf'
            def sourcePath = it.getProjectDir().toString() + '/src/dist'
            def destinationPath = getRootDir().toString() + '/src/dist/' + it.getName() + '/'
            it.copy {
                from sourcePath
                into destinationPath
            }
        }
    }
}

PS: I did some work on my subprojects and implemented a new task called convertReadmeToPdf which produces a README.PDF in the same folder as README.MD.

After running this task, the result is like:

org.mycompany.rootProject
|
|--src/
|  |
|  |-dist/
|  | |
|  | |-org.mycompany.subProject0001/
|  | | |
|  | | |-README.MD
|  | | |-runSubProject0001.cmd
|  | |
|  | |-org.mycompany.subProject0002/
|  | | |
|  | | |-README.MD
|  | | |-runSubProject0002.cmd
|  | |
|  | |-org.mycompany.subProject0003/
|  | | |
|  | | |-README.MD
|  | | |-runSubProject0003.cmd
|  | .
|  | .
|  | .
|  | 
|  |-main/
|  | 
|  |-test/
|
|
|-build.gradle
|-settings.gradle

I know that my first target was to move those files directly on ‘{rootProject}/build/distribution/{subProjectName}’, but since my rootProject is a java-application, by the time distribution plugin do this part, all files is going to be packed into a Zip file and be available on {rootProject}/build/distribution.