import / reuse common strings.xml between different flavours android
My problem: I have many different flavors of an android app. Now every time I want to add/modify a string in the string.xml file I need to change it in every string.xml file for every flavour.
What I want to achieve is the ability to import common strings therefore having the ability to modify strings in one location and it reflect on all the flavours. I scoured the internet for solutions. I came across global entitys:
<!DOCTYPE resources [ <!ENTITY %ents SYSTEM "../raw/entities.ent"> %ents; ]> .... <string name="app_name">&app_name;</string>
The two main problems with this is:
- I still have to add a string tag for each strings.xml file so it doesn’t really solve my problem
- This solution is deprecated because of XXE attacks
Maybe there is a trivial solution and I’m just missing it? Is it even possible?
Any advice/references will be much appreciated Thanks.