Copy Files using Wildcard

Hi… I am new to gradle and have a build script that runs another task to copy some of the Swagger API and Contracts. My question is “Is there a way to include files that follow a certain pattern with use of wildcards?”

include ‘/contracts/*.java’
include '
/api/test1Api.java’
include ‘/api/test2Api.java’
include '
/api/test3SearchApi.java’

I have tried :
include ‘/api/*Api.java’ but that did not work. If I use '/api/*.java’ it will work, but it pulls in all of the files that were generated - controllers, api, etc.

Thanks in advanced for any help.