For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

union

open fun <T> union(specs: Array<Spec<in T>>): Spec<T>(source)
open fun <T> union(specs: Collection<out Spec<in T>>): Spec<T>(source)

Returns a spec that selects the union of those items selected by the given specs. Selects everything when no specs provided.

Since

2.11