diff --git a/android_app/app/build.gradle.kts b/android_app/app/build.gradle.kts index e4081b60..7091f741 100644 --- a/android_app/app/build.gradle.kts +++ b/android_app/app/build.gradle.kts @@ -14,18 +14,26 @@ android { minSdk = 31 targetSdk = 36 versionCode = 67 - versionName = "3.0 beta" + versionName = "3.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + manifestPlaceholders["appName"] = "openScale" + manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher" + manifestPlaceholders["appRoundIcon"] = "@mipmap/ic_launcher_round" } buildTypes { release { isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) + } + + create("beta") { + initWith(getByName("debug")) + applicationIdSuffix = ".beta" + versionNameSuffix = "-beta" + manifestPlaceholders["appName"] = "openScale beta" + manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher_beta" + manifestPlaceholders["appRoundIcon"] = "@mipmap/ic_launcher_beta_round" } } compileOptions { diff --git a/android_app/app/proguard-rules.pro b/android_app/app/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/android_app/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/android_app/app/src/main/AndroidManifest.xml b/android_app/app/src/main/AndroidManifest.xml index 81ae31d0..4c06deda 100644 --- a/android_app/app/src/main/AndroidManifest.xml +++ b/android_app/app/src/main/AndroidManifest.xml @@ -9,15 +9,14 @@ android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" android:fullBackupContent="@xml/backup_rules" - android:icon="@mipmap/ic_launcher" - android:label="@string/app_name" - android:roundIcon="@mipmap/ic_launcher_round" + android:icon="${appIcon}" + android:label="${appName}" + android:roundIcon="${appRoundIcon}" android:supportsRtl="true" android:theme="@style/Theme.OpenScale"> diff --git a/android_app/app/src/main/java/com/health/openscale/ui/navigation/AppNavigation.kt b/android_app/app/src/main/java/com/health/openscale/ui/navigation/AppNavigation.kt index ab08ae56..6f6ac67b 100644 --- a/android_app/app/src/main/java/com/health/openscale/ui/navigation/AppNavigation.kt +++ b/android_app/app/src/main/java/com/health/openscale/ui/navigation/AppNavigation.kt @@ -87,6 +87,7 @@ import androidx.navigation.compose.composable import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import androidx.navigation.navArgument +import com.health.openscale.BuildConfig import com.health.openscale.R import com.health.openscale.core.data.User import com.health.openscale.ui.navigation.Routes.getIconForRoute @@ -235,7 +236,7 @@ fun AppNavigation(sharedViewModel: SharedViewModel) { .fillMaxWidth() ) { Image( - painter = painterResource(id = R.drawable.ic_launcher_foreground), + painter = if (BuildConfig.BUILD_TYPE == "beta") painterResource(id = R.drawable.ic_launcher_beta_foreground) else painterResource(id = R.drawable.ic_launcher_foreground) , contentDescription = stringResource(R.string.app_logo_content_description), modifier = Modifier.size(64.dp) ) diff --git a/android_app/app/src/main/java/com/health/openscale/ui/screen/settings/AboutScreen.kt b/android_app/app/src/main/java/com/health/openscale/ui/screen/settings/AboutScreen.kt index ca0e35a8..c2d84149 100644 --- a/android_app/app/src/main/java/com/health/openscale/ui/screen/settings/AboutScreen.kt +++ b/android_app/app/src/main/java/com/health/openscale/ui/screen/settings/AboutScreen.kt @@ -92,7 +92,7 @@ fun AboutScreen( horizontalAlignment = Alignment.CenterHorizontally ) { Image( - painter = painterResource(id = R.drawable.ic_launcher_foreground), + painter = if (BuildConfig.BUILD_TYPE == "beta") painterResource(id = R.drawable.ic_launcher_beta_foreground) else painterResource(id = R.drawable.ic_launcher_foreground) , contentDescription = stringResource(R.string.app_logo_content_description), modifier = Modifier .size(128.dp) diff --git a/android_app/app/src/main/res/drawable/ic_launcher_beta_foreground.xml b/android_app/app/src/main/res/drawable/ic_launcher_beta_foreground.xml new file mode 100644 index 00000000..eb9b738e --- /dev/null +++ b/android_app/app/src/main/res/drawable/ic_launcher_beta_foreground.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android_app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_beta.xml b/android_app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_beta.xml new file mode 100644 index 00000000..6ae8537e --- /dev/null +++ b/android_app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_beta.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android_app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_beta_round.xml b/android_app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_beta_round.xml new file mode 100644 index 00000000..6ae8537e --- /dev/null +++ b/android_app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_beta_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android_app/app/src/main/res/mipmap-hdpi/ic_launcher_beta.webp b/android_app/app/src/main/res/mipmap-hdpi/ic_launcher_beta.webp new file mode 100644 index 00000000..ec165209 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-hdpi/ic_launcher_beta.webp differ diff --git a/android_app/app/src/main/res/mipmap-hdpi/ic_launcher_beta_round.webp b/android_app/app/src/main/res/mipmap-hdpi/ic_launcher_beta_round.webp new file mode 100644 index 00000000..a079ec47 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-hdpi/ic_launcher_beta_round.webp differ diff --git a/android_app/app/src/main/res/mipmap-mdpi/ic_launcher_beta.webp b/android_app/app/src/main/res/mipmap-mdpi/ic_launcher_beta.webp new file mode 100644 index 00000000..60157197 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-mdpi/ic_launcher_beta.webp differ diff --git a/android_app/app/src/main/res/mipmap-mdpi/ic_launcher_beta_round.webp b/android_app/app/src/main/res/mipmap-mdpi/ic_launcher_beta_round.webp new file mode 100644 index 00000000..46db2f22 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-mdpi/ic_launcher_beta_round.webp differ diff --git a/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher_beta.webp b/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher_beta.webp new file mode 100644 index 00000000..649015fd Binary files /dev/null and b/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher_beta.webp differ diff --git a/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher_beta_round.webp b/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher_beta_round.webp new file mode 100644 index 00000000..7861b6e0 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher_beta_round.webp differ diff --git a/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher_beta.webp b/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher_beta.webp new file mode 100644 index 00000000..dfb4a43e Binary files /dev/null and b/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher_beta.webp differ diff --git a/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher_beta_round.webp b/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher_beta_round.webp new file mode 100644 index 00000000..c782ee39 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher_beta_round.webp differ diff --git a/android_app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_beta.webp b/android_app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_beta.webp new file mode 100644 index 00000000..3fb30fbc Binary files /dev/null and b/android_app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_beta.webp differ diff --git a/android_app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_beta_round.webp b/android_app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_beta_round.webp new file mode 100644 index 00000000..f7c831f1 Binary files /dev/null and b/android_app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_beta_round.webp differ diff --git a/android_app/app/src/main/res/values/ic_launcher_beta_background.xml b/android_app/app/src/main/res/values/ic_launcher_beta_background.xml new file mode 100644 index 00000000..f7d5bde2 --- /dev/null +++ b/android_app/app/src/main/res/values/ic_launcher_beta_background.xml @@ -0,0 +1,4 @@ + + + #53C1ED + \ No newline at end of file