Update build scripts for android

M committed Jan 11, 2022 at 20:20 UTC 26f6be0ce6bd34a9da48e9462bade0d39ec5cd68
3 files changed +35 -22
scripts/android/app_config.sh
+2 -22
@@ -7,25 +7,5 @@ fi
7
8 ./app_properties.sh
9 ./app_icon.sh
10 -
11 -CONFIG_ARGS=""
12 -
13 -case $APP_ANDROID_TYPE in
14 - $MONERO_COM)
15 - CONFIG_ARGS="--monero"
16 - ;;
17 - $CAKEWALLET)
18 - CONFIG_ARGS="--monero --bitcoin"
19 - ;;
20 -esac
21 -
22 -cd ../..
23 -
24 -cp -rf pubspec_description.yaml pubspec.yaml
25 -flutter pub get
26 -flutter pub run tool/generate_pubspec.dart
27 -flutter pub get
28 -flutter packages pub run tool/configure.dart $CONFIG_ARGS
29 -
30 -sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml
31 -sed -i "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml
\ No newline at end of file
10 +./pubspec_gen.sh
11 +./inject_app_details.sh
\ No newline at end of file
scripts/android/inject_app_details.sh new
+11
@@ -0,0 +1,11 @@
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 +cd ../..
9 +sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml
10 +sed -i "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml
11 +cd scripts/android
\ No newline at end of file
scripts/android/pubspec_gen.sh new
+22
@@ -0,0 +1,22 @@
1 +#!/bin/bash
2 +
3 +MONERO_COM=monero.com
4 +CAKEWALLET=cakewallet
5 +CONFIG_ARGS=""
6 +
7 +case $APP_ANDROID_TYPE in
8 + $MONERO_COM)
9 + CONFIG_ARGS="--monero"
10 + ;;
11 + $CAKEWALLET)
12 + CONFIG_ARGS="--monero --bitcoin"
13 + ;;
14 +esac
15 +
16 +cd ../..
17 +cp -rf pubspec_description.yaml pubspec.yaml
18 +flutter pub get
19 +flutter pub run tool/generate_pubspec.dart
20 +flutter pub get
21 +flutter packages pub run tool/configure.dart $CONFIG_ARGS
22 +cd scripts/android
\ No newline at end of file