1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-10 02:36:51 +02:00

Add beta build type with new icon

This commit is contained in:
oliexdev
2025-08-02 16:57:54 +02:00
parent e535e5e4b7
commit 8cff0b34bf
19 changed files with 102 additions and 32 deletions

View File

@@ -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 {

View File

@@ -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

View File

@@ -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">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.OpenScale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@@ -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)
)

View File

@@ -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)

View File

@@ -0,0 +1,69 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="469.33"
android:viewportHeight="469.33">
<group android:scaleX="0.7"
android:scaleY="0.7"
android:translateX="70.3995"
android:translateY="70.3995">
<path
android:pathData="M426.67,0h-384C19.14,0 0,19.14 0,42.67v384c0,23.53 19.14,42.67 42.67,42.67h384c23.53,0 42.67,-19.14 42.67,-42.67v-384C469.33,19.14 450.2,0 426.67,0z"
android:strokeWidth="3"
android:fillColor="#33b6ea"
android:strokeColor="#00000000"/>
<path
android:pathData="m458.44,435.59c0,12.32 -10.08,22.35 -22.45,22.35l-404.14,0c-12.38,0 -22.45,-10.03 -22.45,-22.35l0,-402.35c0,-12.32 10.08,-22.35 22.45,-22.35l404.14,0c12.38,0 22.45,10.03 22.45,22.35l0,402.35z"
android:fillColor="#33b6ea"/>
<path
android:pathData="M234.67,64c-51.28,0 -99.5,19.97 -135.76,56.24c-4.17,4.17 -4.17,10.92 0,15.08l60.33,60.33c4.17,4.17 10.92,4.17 15.08,0c33.27,-33.27 87.42,-33.27 120.69,0c2.08,2.08 4.81,3.13 7.54,3.13s5.46,-1.04 7.54,-3.13l60.33,-60.33c4.17,-4.17 4.17,-10.92 0,-15.08C334.17,83.97 285.95,64 234.67,64z"
android:fillColor="#303C42"/>
<path
android:pathData="M302.18,173.41c-19.56,-16.02 -43.54,-24.03 -67.51,-24.03c-10.07,0 -20.08,1.74 -29.83,4.57l-13.8,-30.36c-2.42,-5.35 -8.73,-7.75 -14.13,-5.29c-5.36,2.44 -7.73,8.76 -5.29,14.13l13.36,29.4c-6.21,3.27 -12.24,7.01 -17.83,11.6L121.76,128.01c31.2,-27.6 70.9,-42.68 112.91,-42.68s81.71,15.07 112.91,42.68L302.18,173.41z"
android:fillColor="#F2F2F2"/>
<path
android:pathData="m471.3,396.81 l0.52,-184.64 -101.94,-92.79 -0.71,0.12c1.39,3.7 0.63,8.12 -2.39,11.29l-59.92,62.87c-2.07,2.17 -4.78,3.34 -7.49,3.47 -2.71,0.13 -4.72,-2.18 -6.79,-4.15 -33.04,-31.49 -90.5,-30.97 -123.54,3.7 -3,3.15 -6.11,0.56 -9.85,-0.61 69.56,63.97 204.8,194.35 281.94,273.25 19.43,-22.65 51.93,66.55 24.55,-85.53 -1.88,-10.42 6.15,46.77 6.15,35.08z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="231.57"
android:startY="129.02"
android:endX="566.52"
android:endY="440.83"
android:type="linear">
<item android:offset="0" android:color="#19000000"/>
<item android:offset="1" android:color="#00000000"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M426.67,0h-384C19.14,0 0,19.14 0,42.67v384c0,23.53 19.14,42.67 42.67,42.67h384c23.53,0 42.67,-19.14 42.67,-42.67v-384C469.33,19.14 450.2,0 426.67,0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="-35.25"
android:startY="108.82"
android:endX="504.58"
android:endY="360.56"
android:type="linear">
<item android:offset="0" android:color="#33FFFFFF"/>
<item android:offset="1" android:color="#00FFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M-13.64,282.34h507.9v106.86h-507.9z"
android:fillColor="#333333"/>
<path
android:pathData="m174.7,307.16q10.01,0 15.08,2.99 5.15,2.91 5.15,10.23 0,4.7 -2.61,7.84 -2.61,3.06 -7.54,3.96v0.37q3.36,0.52 6.05,1.94 2.76,1.42 4.33,4.03 1.57,2.61 1.57,6.79 0,7.24 -5,11.2 -4.93,3.96 -13.51,3.96h-18.74v-53.31zM176.05,329.85q6.87,0 9.41,-2.17 2.54,-2.24 2.54,-6.57 0,-4.41 -3.14,-6.27 -3.06,-1.94 -9.86,-1.94h-8.81v16.95zM166.19,335.45v19.34h10.75q7.09,0 9.86,-2.76 2.76,-2.76 2.76,-7.24 0,-4.18 -2.91,-6.72 -2.84,-2.61 -10.23,-2.61z"
android:fillColor="#ffffff"/>
<path
android:pathData="m237.8,360.47h-29.79v-53.31h29.79v5.9h-23.07v16.65h21.73v5.82h-21.73v19.04h23.07z"
android:fillColor="#ffffff"/>
<path
android:pathData="m266.39,360.47h-6.72v-47.41h-16.65v-5.9h39.95v5.9h-16.58z"
android:fillColor="#ffffff"/>
<path
android:pathData="m319.26,360.47 l-6.42,-16.5h-21.13l-6.35,16.5h-6.79l20.83,-53.54h6.05l20.76,53.54zM304.85,321.86q-0.22,-0.6 -0.75,-2.17 -0.52,-1.57 -1.05,-3.21 -0.45,-1.72 -0.75,-2.61 -0.52,2.31 -1.19,4.55 -0.67,2.17 -1.12,3.43l-6.05,16.13h16.87z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_beta_background"/>
<foreground android:drawable="@drawable/ic_launcher_beta_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_beta_background"/>
<foreground android:drawable="@drawable/ic_launcher_beta_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_beta_background">#53C1ED</color>
</resources>