Skip to content

Commit

Permalink
auto generate locale config
Browse files Browse the repository at this point in the history
(cherry picked from commit a26c69a)
  • Loading branch information
crackededed committed May 29, 2024
1 parent dde1d47 commit de642c3
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 33 deletions.
8 changes: 5 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ android {
targetSdk = 34
versionCode = 239
versionName = "2.32.0"
resourceConfigurations += listOf("ar", "de", "en", "es", "fr", "in", "it", "ja", "pt-rBR", "ru", "tr", "zh-rTW", "zh-rCN")
}

buildTypes {
getByName("debug") {
debug {
applicationIdSuffix = ".debug"
versionNameSuffix = "-DEBUG"
signingConfig = signingConfigs.getByName("debug")
}
getByName("release") {
release {
isShrinkResources = true
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
Expand All @@ -50,6 +49,9 @@ android {
buildConfig = true
viewBinding = true
}
androidResources {
generateLocaleConfig = true
}
lint {
disable += "ContentDescription"
}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/DarkTheme"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/resources.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unqualifiedResLocale=en-US
16 changes: 0 additions & 16 deletions app/src/main/res/xml/locales_config.xml

This file was deleted.

8 changes: 0 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
}

tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ gson = "2.11.0"
hilt = "2.51.1"
hilt-extension-compiler = "1.2.0"
hilt-work = "1.2.0"
kotlin = "1.9.24"
ksp = "1.9.24-1.0.20"
kotlin = "2.0.0"
ksp = "2.0.0-1.0.21"
lifecycle = "2.8.0"
material = "1.12.0"
media3 = "1.3.1"
Expand Down
9 changes: 8 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pluginManagement {
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
Expand All @@ -13,5 +19,6 @@ dependencyResolutionManagement {
jcenter()
}
}

rootProject.name = "Xtra"
include(":app")

0 comments on commit de642c3

Please sign in to comment.