android-gradle-localization-plugin icon indicating copy to clipboard operation
android-gradle-localization-plugin copied to clipboard

Add option to configure res path by DSL

Open koral-- opened this issue 9 years ago • 2 comments

koral-- avatar Jun 16 '15 01:06 koral--

Not only path can be configured by DSL but also other settings. Moreover instead of typing path directly configurations closures can be used like this:

localizationDefaultConfig {
             escapeSlashes false
         } //default settings
localization {
         main {
             csvFileURI '<link to main strings>'
        } //will generate src/main/res/values/strings.xml
         debug {
             csvFileURI '<link to debug strings>'
        } //will generate src/debug/res/values/strings.xml
        flavor1 {
             escapeSlashes true //will overwrite default settings
             csvFileURI '<link to flavor1 strings>'
        }
     }

@ihrthk what do you think?

koral-- avatar Jul 02 '15 23:07 koral--

I think that don't need two extensions..The default configured write in 'main'. You can choose execute specific flavor not all flavors.And old configured should be to support. Like this:

localization {
       main {
             escapeSlashes false
             csvFileURI '<link to main strings>'
        } //will generate src/main/res/values/strings.xml
        debug {
             csvFileURI '<link to debug strings>'
        } //will generate src/debug/res/values/strings.xml
        flavor1 {
             escapeSlashes true //will overwrite default settings
             csvFileURI '<link to flavor1 strings>'
        }
}

ihrthk avatar Jul 03 '15 01:07 ihrthk