Skip to content

Commit e0b4551

Browse files
committed
gradle: generate locales for per-app picking
Enable the per-app locale picking menu by adding the right metadata automatically to the manifest with new AGP automation. This attempts to follow: https://developer.android.com/guide/topics/resources/app-languages#use-localeconfig Using the new AGP feature: https://developer.android.com/studio/preview/features#automatic-per-app-languages It appears to work, and it also should squelch the "W AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : " warnings on old Android that syphyr pointed out. Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 7b9757b commit e0b4551

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ui/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ android {
5454
matchingFallbacks += "release"
5555
}
5656
}
57+
androidResources {
58+
generateLocaleConfig = true
59+
}
5760
lint {
5861
disable += "LongLogTag"
5962
warning += "MissingTranslation"

ui/src/main/res/resources.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unqualifiedResLocale=en-US

0 commit comments

Comments
 (0)