Multiple outputs from a single task in the software model

How would I model a single component/binary/binary task in the software model which produces multiple output files? The way I read the docs suggests that I would make a component, which produces multiple binaries, which each generate a task (or more). However, I have an external tool, which given a list of inputs, will produce all the binaries in one go.

I realize I could just add a list of outputs to the task, and for the sake of doing what I need to do, I can totally ignore this, but I’m curious to know if this scenario has received some consideration by the community, perhaps there’s a better way?

As an example, I have a component “App”, which produces a binary “AppExe”, which produces a task “BuildAppExe”, which when run produces a 32-bit and a 64-bit output. These two need then be handled differently by later tasks. With some config manipulation I could make the task always only produce either one, and have two tasks, but that would increase the build time, as some of the work done by the tool is being shared by the two, and it’s not clever enough to not redo it if run in sequence.

I’m building all of this via a custom plugin, it’s not using Java, nor the native toolchain.

I opened up the latest gradle source and I see that the Play plugin does this in a way, the binary spec contains several outputs, but they are each generated by a different task. Dependent tasks are created with the binary spec as input, so they get the details from there. While not exactly the same, I’ll try this route.