Get a reference to included builds for source dependencies

I’m trying to get references to the included builds that are created when resolving source dependencies.

I can do the following to get the BuildIdentifiers:

def sourceDependencyBuildIDs = []

def deps = configurations.someConfiguration.incoming.resolutionResult.allDependencies
deps.each { dep ->
    def owner = dep.selected.variants[0].owner  // assume single variant for simplicity
    if (owner instanceof ProjectComponentIdentifier) {
        if (!owner.build.isCurrentBuild()) {
            sourceDependencyBuildIDs << owner.build
        }
    }
}

The build identifiers contain the names of the included builds created by Gradle internally for the source dependencies. Unfortunately, they don’t show up in the list of gradle.includedBuilds.

My ultimate goal is to get the path of each Git repo where the resolved source dependencies reside. Is there any way of doing this?