Not quite sure what you need, but here's a quick and dirty way to access FileCollection :my-non-java-project:doZip task outputs:
project(":my-non-java-project").tasks.getByName("doZip").outputs.files
Note that the archives configuration is added by the Java plugin , not the base plugin. But you can still define a custom configuration in my-non-java-project and add an artifact to it with code in the OP:
//in my-non-java-project/build.gradle configurations { archives } artifacts { archives doZip }
Then you can access the task exits through the configuration, for example (again, quickly and dirty):
//in some-java-project/build.gradle project(":my-non-java-project").configurations.archives.artifacts.files
Please note that you can expand the contents of your zip file using zipTree .
If you need to publish a zip created by my-non-java-project , you can read about it here .
source share