Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protobuf dependency configuration is marked consumable #745

Open
berksean opened this issue Feb 2, 2024 · 0 comments
Open

protobuf dependency configuration is marked consumable #745

berksean opened this issue Feb 2, 2024 · 0 comments

Comments

@berksean
Copy link

berksean commented Feb 2, 2024

The protobuf dependecy configuration (used to pull in artifacts containing proto files that need code generation) appears to mark both isCanBeConsumed and isCanBeResolved as true, which is no longer recommended by Gradle (table just above here.

The protobuf configuration doesn't produce an artifact/variant, so it should probably have isCanBeConsumed set to false.

This usually isn't an issue, but in some situations the incorrect indication that protobuf is an outgoing variant can make configuring/customize variant selection difficult.

For example, if a plugin adds an outgoing variant that can be used by consumers with the protobuf configuration, and also wants the make the protobuf configuration prefer variants tagget with a certain attribute, the vestigial isCanBeConsumed protobuf configuration causes variant selection ambiguity.

I can work around this myself by disabling isCanBeConsumed on protobuf myself, but ideally the protobuf-gradle-plugin configurations would have the resolvable/consumable flags set appropriately.

This would be a fairly minor change here to set the consumable flag to false.

I'm not aware if this behavior is relied upon somehow, but I don't see any variant configuration associated with these configurations, so it appears to be safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant