koral-- / android-gradle-localization-plugin

Gradle plugin for generating localized string resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I use this plugin with multiple flavours with different localizations ?

aimilushev opened this issue · comments

I have a project with 2 flavours. I want to have different strings for both flavours. We have small amount of strings that differ between the flavours so I want to have a single excel file with two spreadsheets - one containing all the strings used in the first flavour (the main one) and a second spreadsheet containing only the strings that differ in the second flavour, overriding the main strings (placing it inside the second flavour source sets). Is this possible with the current implementation ?

Sorry for the delay. It should be possible but indirectly.
Firstly you need integrate spreadsheet with common values to your existing module as usual.
Then create a new Gradle module (eg. called flavorX-translations) and integrate spreadsheet for that flavor with this module.
Lastly add a dependency to that new module only for flavorX: flavorXimplementation project(":flavorX-translations").