Copy all jars from subprojects to root project's bin directory

I’d like to copy every jar generated from subprojects from their /bin/libs dir to the root project’s bin dir. Unfortunately, my current code just copies everything from the subprojects into that directory:

task muleapp(type: Copy) {
    from '.'
    include '**/bin/libs/*.jar'
    into 'bin'

How can I achieve the desired functionality?

Could you provide a bit more information about what you’d like to accomplish?

Do you wish to copy just the jars produced by all of the subprojects, or do you also wish to copy the jars of external dependencies (ie third-party libs)?