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

Don't add runtime dependencies if nothing is generated #201

Open
drewhamilton opened this issue Jul 20, 2023 · 0 comments
Open

Don't add runtime dependencies if nothing is generated #201

drewhamilton opened this issue Jul 20, 2023 · 0 comments

Comments

@drewhamilton
Copy link
Collaborator

androidx.collection:collection, paraphrase-runtime, and optionally paraphrase-runtime-compose-ui are all added as soon as the Paraphrase plugin is applied. But if the module to which it is applied has no format-able string resources, nothing is generated and the dependencies are unused. Paraphrase should only depend on these if it uses them.

Unfortunately, this is not trivial to implement. Moving addDependencies into GenerateFormattedResources results in compilation failure:

org.gradle.api.InvalidUserDataException: Cannot change dependencies of dependency configuration ':sample:app:api' after it has been included in dependency resolution.

I suspect moving the resource parsing into ParaphrasePlugin.apply would be too heavy, so I'm not sure how to solve this.

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