CommandLineArgumentProviders can have `@Input`s, so if you can get it whether or not the dependency is present (ResolvedArtifactResult or ResolvedComponentResult), then it can decide what to return from its asArguments(): either an empty list or the expected arguments.