chore: locales_config.xml

This commit is contained in:
Ahmad Ansori Palembani 2024-06-16 13:09:28 +07:00
parent 11145cf716
commit 9a86f99799
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
4 changed files with 8 additions and 6 deletions

View file

@ -9,6 +9,7 @@ fun TaskContainerScope.registerLocalesConfigTask(project: Project): TaskProvider
val emptyResourcesElement = "<resources>\\s*</resources>|<resources/>".toRegex()
val valuesPrefix = "values-?".toRegex()
println(projectDir)
val languages = fileTree("$projectDir/src/main/res/")
.matching {
include("**/strings.xml")

2
i18n/.gitignore vendored
View file

@ -1,2 +1,2 @@
# Generated
locales_config.xml
#locales_config.xml

View file

@ -30,10 +30,11 @@ multiplatformResources {
}
tasks {
val localesConfigTask = registerLocalesConfigTask(project)
preBuild {
dependsOn(localesConfigTask)
}
// FIXME: Migrate fully to MR
// val localesConfigTask = registerLocalesConfigTask(project)
// preBuild {
// dependsOn(localesConfigTask)
// }
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(

View file

@ -53,4 +53,4 @@
<locale android:name="vi"/>
<locale android:name="zh-Hans"/>
<locale android:name="zh-Hant"/>
</locale-config>
</locale-config>