It seems that creating the output directory (associated with a source set) is necessary. As long as there is a single output directory for the `test` source set this line creates that directory, unless the directory already exists in which case it does nothing.