diff --git a/.gitignore b/.gitignore index ad0e23848..668aa494c 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,13 @@ flutter_libsparkmobile.dll secp256k1.dll /libisar.so /lib/app_config.g.dart + +## other generated project files + +/android/app/build.gradle +/android/app/src/debug/AndroidManifest.xml +/android/app/src/profile/AndroidManifest.xml +/android/app/src/main/AndroidManifest.xml +/android/app/src/main/profile/AndroidManifest.xml +/android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt +/android/app/src/main/res/**/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 1fd042714..000000000 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index f1f75c5e4..000000000 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index b816e61f2..000000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 6710b67f0..000000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 095c133e4..000000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/scripts/app_config/platforms/android/platform_config.sh b/scripts/app_config/platforms/android/platform_config.sh index c9254b597..bad8fa5c0 100755 --- a/scripts/app_config/platforms/android/platform_config.sh +++ b/scripts/app_config/platforms/android/platform_config.sh @@ -2,10 +2,29 @@ set -x -e -sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/android/app/build.gradle" -sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/android/app/src/debug/AndroidManifest.xml" -sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/android/app/src/profile/AndroidManifest.xml" -sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/android/app/src/main/AndroidManifest.xml" -sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/android/app/src/main/AndroidManifest.xml" -sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/android/app/src/main/profile/AndroidManifest.xml" -sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt" +F0="android/app/build.gradle" +F1="android/app/src/debug/AndroidManifest.xml" +F2="android/app/src/profile/AndroidManifest.xml" +F3="android/app/src/main/AndroidManifest.xml" +F4="android/app/src/main/profile/AndroidManifest.xml" +F5="android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt" + +TEMPLATES="${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates" + +for (( i=0; i<=5; i++ )); do + VAR="F${i}" + FILE="${APP_PROJECT_ROOT_DIR}/${!VAR}" + if [ -f "${FILE}" ]; then + rm "${FILE}" + fi + cp "${TEMPLATES}/${!VAR}" "${FILE}" +done + + +sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F0}" +sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F1}" +sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F2}" +sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F3}" +sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F3}" +sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F4}" +sed -i "s/${APP_ID_PLACEHOLDER}/${NEW_APP_ID}/g" "${APP_PROJECT_ROOT_DIR}/${F5}" diff --git a/android/app/build.gradle b/scripts/app_config/templates/android/app/build.gradle similarity index 100% rename from android/app/build.gradle rename to scripts/app_config/templates/android/app/build.gradle diff --git a/android/app/src/debug/AndroidManifest.xml b/scripts/app_config/templates/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to scripts/app_config/templates/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/scripts/app_config/templates/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to scripts/app_config/templates/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt b/scripts/app_config/templates/android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt rename to scripts/app_config/templates/android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt diff --git a/android/app/src/main/profile/AndroidManifest.xml b/scripts/app_config/templates/android/app/src/main/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/main/profile/AndroidManifest.xml rename to scripts/app_config/templates/android/app/src/main/profile/AndroidManifest.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/scripts/app_config/templates/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to scripts/app_config/templates/android/app/src/profile/AndroidManifest.xml