Because of that, a resolution without requested attributes is not able to identify the 'runtime' variant as the preferred one.
To resolve that, we now set the sources variant to SHADOWED as well to match the library variant it belongs to. Although it technically does not contain all the sources of the shadowed classes.
Then legacy behavior like: 'configurations.compile.files' (resolving the Tooling API directly through the 'compile' configuration) still works as before. The runtime variant is selected.
This commit also adds integration test coverage: This includes the typical scenarios - compileClasspath and runtimeClasspath - and also the case where you just create a configuration without attributes - similar to resolving the legacy 'default' or 'compile' configurations.