An Android Gradle plugin for automating the new localization features introduced together with Android 13.
Note: App Compat 1.6.0-beta01
or higher is required. See here for more information.
- Generating
locale-config.xml
files for each variant and flavor. - Configure the manifest automatically to take the created locale config file.
First, add the plugin to your project's classpath:
buildscript {
dependencies {
classpath("com.arnyminerz.locator:Locator:1.0.2")
}
}
And to the plugins section of your build.gradle(.kts)
file:
plugins {
id("com.arnyminerz.locator")
}
Now build the project, and everything should be ready to go. You can access the locales keys with
Locator.LocalesKeys
. There's also Locator.Locales
, which provides the same options, already
converted into Locale
.