mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-11 21:56:17 +00:00
fix: Prevent trailing comma when no locales are generated
This commit is contained in:
@@ -266,7 +266,7 @@ tasks {
|
||||
.filter { it.isDirectory && it.name.matches(Regex("values-[a-z]{2}(-r[A-Z]{2})?")) }
|
||||
.map { it.name.removePrefix("values-").replace("-r", "-") }
|
||||
.sorted()
|
||||
.joinToString(",\n ") { "Locale.forLanguageTag(\"$it\")" }
|
||||
.joinToString("\n ") { "Locale.forLanguageTag(\"$it\")," }
|
||||
|
||||
val output = outputDir.get().asFile.resolve("app/revanced/manager/util/GeneratedLocales.kt")
|
||||
output.parentFile.mkdirs()
|
||||
@@ -278,8 +278,7 @@ tasks {
|
||||
|
|
||||
|object GeneratedLocales {
|
||||
| val SUPPORTED_LOCALES = listOf(
|
||||
| Locale.ENGLISH,
|
||||
| $locales,
|
||||
| Locale.ENGLISH,$locales
|
||||
| )
|
||||
|}
|
||||
""".trimMargin()
|
||||
|
||||
Reference in New Issue
Block a user