diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3b53b00cf1..0da59234da 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -59,21 +59,27 @@ android { splits { // Configures multiple APKs based on ABI. abi { - // Enables building multiple APKs per ABI. - isEnable = true + val buildingAppBundle = gradle.startParameter.taskNames.any { it.contains("bundle") } + + // Enables building multiple APKs per ABI. This should be disabled when building an AAB. + isEnable = !buildingAppBundle + // By default all ABIs are included, so use reset() and include to specify that we only // want APKs for armeabi-v7a, x86, arm64-v8a and x86_64. // Resets the list of ABIs that Gradle should create APKs for to none. reset() - // Specifies a list of ABIs that Gradle should create APKs for. - include("armeabi-v7a", "x86", "arm64-v8a", "x86_64") - // Generate a universal APK that includes all ABIs, so user who installs from CI tool can use this one by default. - isUniversalApk = true + + if (!buildingAppBundle) { + // Specifies a list of ABIs that Gradle should create APKs for. + include("armeabi-v7a", "x86", "arm64-v8a", "x86_64") + // Generate a universal APK that includes all ABIs, so user who installs from CI tool can use this one by default. + isUniversalApk = true + } } } - defaultConfig { - resourceConfigurations += locales + androidResources { + localeFilters += locales } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cfab07f3e9..aa73c2000d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ [versions] # Project -android_gradle_plugin = "8.8.1" +android_gradle_plugin = "8.9.1" kotlin = "2.1.10" kotlinpoet = "2.1.0" ksp = "2.1.10-1.0.31" diff --git a/plugins/src/main/kotlin/extension/locales.kt b/plugins/src/main/kotlin/extension/locales.kt index ab8507c622..0e7ec238b0 100644 --- a/plugins/src/main/kotlin/extension/locales.kt +++ b/plugins/src/main/kotlin/extension/locales.kt @@ -9,7 +9,7 @@ val locales = setOf( "de", "el", "en", - "en_US", + "en-rUS", "es", "et", "eu", diff --git a/tools/localazy/importSupportedLocalesFromLocalazy.py b/tools/localazy/importSupportedLocalesFromLocalazy.py index e58426e375..526dc23b4f 100755 --- a/tools/localazy/importSupportedLocalesFromLocalazy.py +++ b/tools/localazy/importSupportedLocalesFromLocalazy.py @@ -36,6 +36,8 @@ def normalizeForResourceConfigurations(locale): return "pt-rBR" case "zh#Hans": return "zh-rCN" + case "en_US": + return "en-rUS" case _: return locale