From 86288e66b4160a753ddbb413840f2f0fc4435c9b Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sat, 19 Aug 2023 10:03:54 -0700 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=A8=20Add=20additional=20build=20s?= =?UTF-8?q?cript=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Support building individual platforms with the prod JS but dev native code - This will allow us to test the prod JS by connecting with a debugger (if needed) - Also allows quicker dev cycle by building only one platform at a time (note that for testing outside the devapp, we need to build the app every time) - Ensures that we don't need to get off the VPN just to build iOS - Ensures that we can build prod JS iOS version for archival and submission - Support building android with the prod JS and prod native code - To support building the aab to upload to the play store Testing done: - Used for building the NREL OpenPATH app --- package.cordovabuild.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.cordovabuild.json b/package.cordovabuild.json index 72c8304aa..0b4990127 100644 --- a/package.cordovabuild.json +++ b/package.cordovabuild.json @@ -11,7 +11,10 @@ "build": "npx webpack --config webpack.prod.js && npx cordova build", "build-dev": "npx webpack --config webpack.dev.js && npx cordova build", "build-dev-android": "npx webpack --config webpack.dev.js && npx cordova build android", - "build-dev-ios": "npx webpack --config webpack.dev.js && npx cordova build ios" + "build-dev-ios": "npx webpack --config webpack.dev.js && npx cordova build ios", + "build-prod-android": "npx webpack --config webpack.prod.js && npx cordova build android", + "build-prod-ios": "npx webpack --config webpack.prod.js && npx cordova build ios", + "build-prod-android-release": "npx webpack --config webpack.prod.js && npx cordova build android --release" }, "devDependencies": { "@babel/core": "^7.21.3", From b17f0943b8bbc8270503685a41b962baa329d6ce Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sat, 19 Aug 2023 10:13:15 -0700 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A8=20Change=20the=20android=20bui?= =?UTF-8?q?ld=20scripts=20to=20use=20`npm=20run`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that we use webpack for the javascript properly Testing done: - Used to build the NREL OpenPATH app --- bin/sign_and_align_keys.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sign_and_align_keys.sh b/bin/sign_and_align_keys.sh index 3a0bb0d76..261058bd5 100644 --- a/bin/sign_and_align_keys.sh +++ b/bin/sign_and_align_keys.sh @@ -10,7 +10,7 @@ fi # Sign and release the L+ version # Make sure the highest supported version has the biggest version code -npx cordova build android --release -- --minSdkVersion=22 +npm run build-prod-android # cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.aab platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/bundle/release/app-release.aab androidproductionkey cp platforms/android/app/build/outputs/bundle/release/app-release.aab $1-build-$2.aab From 84714727843bf915f887dcc1216990ee4b5e99f4 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sat, 19 Aug 2023 10:15:41 -0700 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A8=20Add=20a=20script=20to=20crea?= =?UTF-8?q?te=20an=20app=20zip=20of=20the=20current=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that we can archive it to check out old functionality if needed --- bin/gen_release_app_zip.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bin/gen_release_app_zip.sh diff --git a/bin/gen_release_app_zip.sh b/bin/gen_release_app_zip.sh new file mode 100644 index 000000000..abcd193c9 --- /dev/null +++ b/bin/gen_release_app_zip.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +PROJECT=$1 +VERSION=$2 + +pushd platforms/ios/build/emulator +zip -o ../../../../$PROJECT-build-$VERSION.app.zip -r NREL\ OpenPATH.app +popd From faa1cfa929f4ff7ae1bd8e2ef7ae7fc7b30848a8 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sat, 19 Aug 2023 16:34:12 -0700 Subject: [PATCH 4/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=20Bump=20up=20the=20c?= =?UTF-8?q?ore=20versions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `cordova-android` to 12 - `cordova-plugin-file` to 8.0.0 - Remove SDK version overrides and go with the cordova-android defaults Note that this will not work until https://github.com/e-mission/e-mission-data-collection/pull/207 is merged https://github.com/e-mission/e-mission-phone/pull/1016#issuecomment-1685115110 --- config.cordovabuild.xml | 3 --- package.cordovabuild.json | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config.cordovabuild.xml b/config.cordovabuild.xml index 6a0c1480e..d3d562802 100644 --- a/config.cordovabuild.xml +++ b/config.cordovabuild.xml @@ -13,7 +13,6 @@ - @@ -48,8 +47,6 @@ - - diff --git a/package.cordovabuild.json b/package.cordovabuild.json index 0b4990127..a78eb4a4b 100644 --- a/package.cordovabuild.json +++ b/package.cordovabuild.json @@ -118,7 +118,7 @@ "chart.js": "^4.3.0", "chartjs-adapter-luxon": "^1.3.1", "chartjs-plugin-annotation": "^3.0.1", - "cordova-android": "11.0.0", + "cordova-android": "12.0.0", "cordova-ios": "6.2.0", "cordova-plugin-advanced-http": "3.3.1", "cordova-plugin-androidx-adapter": "1.1.3", @@ -133,7 +133,7 @@ "cordova-plugin-em-unifiedlogger": "git+https://github.com/e-mission/cordova-unified-logger.git#v1.3.6", "cordova-plugin-em-usercache": "git+https://github.com/e-mission/cordova-usercache.git#v1.1.6", "cordova-plugin-email-composer": "git+https://github.com/katzer/cordova-plugin-email-composer.git#0.10.1", - "cordova-plugin-file": "7.0.0", + "cordova-plugin-file": "8.0.0", "cordova-plugin-inappbrowser": "5.0.0", "cordova-plugin-ionic-keyboard": "2.2.0", "cordova-plugin-ionic-webview": "5.0.0", From 7688cafbb2033684ca03c5b1461d160637f00ee7 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sat, 19 Aug 2023 22:01:15 -0700 Subject: [PATCH 5/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=20=F0=9F=94=A5=20Bump?= =?UTF-8?q?=20up=20the=20platform=20version=20+=20remove=20override=20work?= =?UTF-8?q?around?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everything should compile now. We can check in the sdk changes independently; the main goal is to start testing these changes before the release. --- package.cordovabuild.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.cordovabuild.json b/package.cordovabuild.json index a78eb4a4b..3017715c6 100644 --- a/package.cordovabuild.json +++ b/package.cordovabuild.json @@ -125,7 +125,7 @@ "cordova-plugin-app-version": "0.1.14", "cordova-plugin-customurlscheme": "5.0.2", "cordova-plugin-device": "2.1.0", - "cordova-plugin-em-datacollection": "git+https://github.com/e-mission/e-mission-data-collection.git#v1.7.8", + "cordova-plugin-em-datacollection": "git+https://github.com/e-mission/e-mission-data-collection.git#v1.7.9", "cordova-plugin-em-opcodeauth": "git+https://github.com/e-mission/cordova-jwt-auth.git#v1.7.2", "cordova-plugin-em-server-communication": "git+https://github.com/e-mission/cordova-server-communication.git#v1.2.6", "cordova-plugin-em-serversync": "git+https://github.com/e-mission/cordova-server-sync.git#v1.3.2",