Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit ff4705ac authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé
Browse files

Bump AGP 8.7.3 to 8.8.0 and migrate resourceConfigurations to androidResources.localeFilters

parent 73611a3e
Loading
Loading
Loading
Loading
+55 −55
Original line number Diff line number Diff line
@@ -21,9 +21,12 @@ android {
        versionName = "12.0"
        versionNameSuffix = "a1"

        buildConfigField("String", "CLIENT_INFO_APP_NAME", "\"K-9 Mail\"")
    }

    androidResources {
        // Keep in sync with the resource string array "supported_languages"
        resourceConfigurations.addAll(
            listOf(
        localeFilters += listOf(
            "ar",
            "be",
            "bg",
@@ -74,10 +77,7 @@ android {
            "vi",
            "zh_CN",
            "zh_TW",
            ),
        )

        buildConfigField("String", "CLIENT_INFO_APP_NAME", "\"K-9 Mail\"")
    }

    signingConfigs {
+55 −55
Original line number Diff line number Diff line
@@ -20,9 +20,12 @@ android {
        versionCode = 4
        versionName = "12.0"

        buildConfigField("String", "CLIENT_INFO_APP_NAME", "\"Thunderbird for Android\"")
    }

    androidResources {
        // Keep in sync with the resource string array "supported_languages"
        resourceConfigurations.addAll(
            listOf(
        localeFilters += listOf(
            "ar",
            "be",
            "bg",
@@ -73,10 +76,7 @@ android {
            "vi",
            "zh_CN",
            "zh_TW",
            ),
        )

        buildConfigField("String", "CLIENT_INFO_APP_NAME", "\"Thunderbird for Android\"")
    }

    signingConfigs {
+7 −5
Original line number Diff line number Diff line
@@ -50,21 +50,23 @@ all languages, this should be discussed with the core team who will use this pro

# Managing translations

Right now we're using the `resourceConfigurations` mechanism provided by the Android Gradle Plugin to limit which
languages are included in builds of the app.
See e.g. https://github.com/thunderbird/thunderbird-android/blob/176a520e86bfe6875ad409a7565d122406dc7550/app-k9mail/build.gradle.kts#L40-L48
Right now we're using the `androidResources.localeFilters` mechanism provided by the Android Gradle Plugin to limit
which languages are included in builds of the app,
See [localFilters](<https://developer.android.com/reference/tools/gradle-api/8.8/com/android/build/api/dsl/ApplicationAndroidResources#localeFilters()>).

This list needs to be kept in sync with the string array `supported_languages`, so the in-app language picker offers
exactly the languages that are included in the app.

## Removing a language

1. Remove the language code from the `resourceConfigurations` list in `app-k9mail/build.gradle.kts`.
1. Remove the language code from the `androidResources.localeFilters` list in `app-thunderbird/build.gradle.kts` and
   `app-k9mail/build.gradle.kts`.
2. Remove the entry from `supported_languages` in `app/core/src/main/res/values/arrays_general_settings_values.xml`.

## Adding a language

1. Add the language code to the `resourceConfigurations` list in `app-k9mail/build.gradle.kts`.
1. Add the language code to the `androidResources.localeFilters` list in `app-thunderbird/build.gradle.kts` and
   `app-k9mail/build.gradle.kts`.
2. Add an entry to `supported_languages` in `app/core/src/main/res/values/arrays_general_settings_values.xml`.
3. Make sure that `language_values` in `app/core/src/main/res/values/arrays_general_settings_values.xml` contains an
   entry for the language code you just added. If not:
+2 −2
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@ androidBilling = "7.1.1"
androidDesugar = "2.1.5"
androidMaterial = "1.12.0"
# AGP and tools should be updated together
androidGradlePlugin = "8.7.3"
androidTools = "31.7.3"
androidGradlePlugin = "8.8.0"
androidTools = "31.8.0"
androidxActivity = "1.10.1"
androidxAnnotation = "1.9.1"
androidxAppCompat = "1.7.0"