Speed up source collection for Source Context
Problem Statement
Currently we're copying all sources.
Extracted out of https://github.com/getsentry/sentry-java/issues/633
Solution Brainstorm
Speed up plugin e.g. by symlinking files instead of copying; needs test on how slow this actually is for larger projects - if
Symlinking only works on unix systems and not sure how well it works with all the gradle shenanigans around caching, config avoidance, up-to-dateness and whatnot. A better approach is probably to let the CLI do the collection job and just pass the source paths there. This way we'd just copy once (directly to the source bundle) instead of pre-copying into a single folder first.
Has to tweak this codepath probs: https://github.com/getsentry/sentry-cli/blob/987e9337c1d2f59278583915714b7f61c5e8c605/src/commands/debug_files/bundle_jvm.rs#L89
Symlinking only works on unix systems
EDIT: looks like it's possible to do that through Java's NIO package on Windows, but requires admin privileges and we definitely don't wanna deal with that