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

Android: setting out for a target breaks the build if there is 2 or more variants #2543

Open
oldergod opened this issue Jul 14, 2023 · 2 comments

Comments

@oldergod
Copy link
Member

Wire will generate a task per variant but they'll end up having the same output location which will cause troubles.
We should either throw if we detect this scenario, and/or allow the consumer to set an output dir per variant

@martinbonnin
Copy link
Collaborator

Would it make sense to generate a single task that is then used by all Android variants? It simplifies the build a lot and I think this is the default that most builds want?

For users that really want different .proto for debug vs release variants, there could be a way to generate multiple schemas and "wire" (no pun intended :)) to different variants.

@oldergod
Copy link
Member Author

By the way, the issue isn't up to date.
Each task would now emit into its own directory as shown in this sample https://github.com/square/wire/tree/master/samples/android-app-variants-sample

Were we to generate everything at the same location, one could still customize the schema handlers' block with the out field.

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

2 participants