How to bundle static resources from other subproject into java application

I believe this question is very close to what you are trying to accomplish. Please see the answer I gave there:

Also, see this documentation:

https://docs.gradle.org/current/userguide/cross_project_publications.html#cross_project_publications