Gradle works with configurations to group dependencies. For GradleFx we have the merged, internal, external, rsl and test configurations. You can do this to create a list of dependency files which are merged into the final swf:
def mergedDependencyfiles = [] project.configurations.merged.files.each { dependency -> mergedDependencyFiles.add(dependency); } so getting all those dependencies and adding them to a zip should be no problem. You've also got access to the Java API, which has classes to manipulate files, create zips etc.