-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add ability to override resources in application #1875
Comments
Thanks for the suggestion. There's definitely an interesting idea contained in this suggestion - the catch is how we can implement it in a generic way that makes sense. Broadly speaking, "here's a collection of files I want you to copy into the final project" makes sense as a use case. The question is the exact format for that file specification. Your suggestion is specific to Android resources - which will definitely be a good use of this feature, but there are other files you might want to add to an Android project, and other platforms may have use for this feature. We could possibly treat this as an analog of The best idea I can think of right now it to treat this as specification of roots: so a configuration like:
would copy all the files in the There's some details to finesse about exactly how you'd copy in a full directory tree; but hopefully this gives the start of an idea that someone can turn into an implementation. |
What is the problem or limitation you are having?
Is there any way to add or override resource files?
This is extremely useful when managing resources. For example, I'd like my ic_launcher_background be defined in an xml, to support gradient colors.
Describe the solution you'd like
Either under the android specific section in pyproject.toml, or by modifying briefcase.toml.
For example, a project can store the overrides under a directory, with the exact same hierarchy.
And in pyproject.toml, user specifies this dir to override the resiurces under
[tool.briefcase.app.xdcheckin.android]
.The packaging process will first apply the common res dir in the project's
src/<name>/app/res
, then apply the overrides directly to the generated template's res dir.Describe alternatives you've considered
Modifying res in the result .apk can also work, but it's not convenient and universal for every briefcase projects.
Additional context
Thanks.
The text was updated successfully, but these errors were encountered: