Native output folders are not consistent

It seems if only one kind of target OS (window, linux, mac) is configured, the OS level of directory hierarchy is skipped in the output path for a native shared library and only the architecture directory is used.
When multiple OS’ are configured, even though only one is capable of building on the current OS, a directory level is added with the OS name. This seems like an unnecessary difference that just makes scripting awkward.
My Gradle script will dynamically adjust the target machines depending on other project parameters, and then run a common set of tasks to try to bundle the result. Having the output directory for a particular target change based on which targets were configured is making this difficult to handle.
What is the recommended way to get the output file(s) for a particular target? The dynamic nature of the tasks make it non-trivial to find.

This issue was mentioned here Gradle Native: always include targetplatform in build directories without any real resolution.