Config for android app.
M committed
Jan 4, 2022 at 18:55 UTC
8fa1fe1b04ebc37d4e2e54208c6347a8e185c52a
3 files changed
+11
-3
android/app/build.gradle
+2
-2
@@ -38,13 +38,13 @@ android {
38
}
39
40
defaultConfig {
41
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42
- applicationId "com.cakewallet.cake_wallet"
41
+ applicationId System.getenv('APP_ANDROID_ID')
42
minSdkVersion 21
43
targetSdkVersion 29
44
versionCode flutterVersionCode.toInteger()
45
versionName flutterVersionName
46
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47
+ manifestPlaceholders = [APP_NAME: System.getenv('APP_ANDROID_NAME')]
48
49
externalNativeBuild {
50
cmake {
android/app/src/main/AndroidManifest.xml
+1
-1
@@ -8,7 +8,7 @@
8
9
<application
10
android:name=".Application"
11
- android:label="Cake Wallet"
11
+ android:label="${APP_NAME}"
12
android:allowBackup="false"
13
android:fullBackupContent="false"
14
android:icon="@mipmap/ic_launcher"
scripts/android/app_config.sh
new
+8
@@ -0,0 +1,8 @@
1
+#!/bin/bash
2
+
3
+if [ -z "$APP_ANDROID_TYPE" ]; then
4
+ echo "Please set APP_ANDROID_TYPE"
5
+ exit 1
6
+fi
7
+
8
+sed -i '0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}' ./../../pubspec.yaml