From cd2d2b794b651b7d89da5430c14970748843edd5 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Fri, 31 Mar 2023 13:22:28 +0700 Subject: [PATCH] fix(android): Move cp from configure to build actions --- android/KMAPro/build.sh | 6 +++--- android/KMEA/build.sh | 16 ++++++++-------- android/Samples/KMSample1/build.sh | 6 ++++-- android/Samples/KMSample2/build.sh | 5 +++-- android/Tests/KeyboardHarness/build.sh | 5 +++-- oem/firstvoices/android/build.sh | 6 +++--- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/android/KMAPro/build.sh b/android/KMAPro/build.sh index 883e9a752b..192e321118 100755 --- a/android/KMAPro/build.sh +++ b/android/KMAPro/build.sh @@ -80,9 +80,6 @@ fi if builder_start_action configure; then - # Copy Keyman Engine for Android - cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/KMAPro/kMAPro/libs/keyman-engine.aar" - KEYBOARD_PACKAGE_ID="sil_euro_latin" KEYBOARDS_TARGET="$KEYMAN_ROOT/android/KMAPro/kMAPro/src/main/assets/${KEYBOARD_PACKAGE_ID}.kmp" MODEL_PACKAGE_ID="nrc.en.mtnt" @@ -96,6 +93,9 @@ fi if builder_start_action build; then + # Copy Keyman Engine for Android + cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/KMAPro/kMAPro/libs/keyman-engine.aar" + # Convert markdown to html for offline help build_help_html android KMAPro/kMAPro/src/main/assets/info diff --git a/android/KMEA/build.sh b/android/KMEA/build.sh index f3b2460ec0..c479d9a133 100755 --- a/android/KMEA/build.sh +++ b/android/KMEA/build.sh @@ -72,6 +72,14 @@ fi if builder_start_action configure:engine; then + builder_finish_action success configure:engine +fi + +# Destinations that will need the keymanweb artifacts + + +if builder_start_action build:engine; then + # Copy KeymanWeb artifacts echo "Copying Keyman Web artifacts" cp "$KEYMAN_WEB_ROOT/build/app/embed/$CONFIG/osk/ajax-loader.gif" "$ENGINE_ASSETS/ajax-loader.gif" @@ -86,14 +94,6 @@ if builder_start_action configure:engine; then echo "Copying es6-shim polyfill" cp "$KEYMAN_ROOT/node_modules/es6-shim/es6-shim.min.js" "$ENGINE_ASSETS/es6-shim.min.js" - builder_finish_action success configure:engine -fi - -# Destinations that will need the keymanweb artifacts - - -if builder_start_action build:engine; then - echo "BUILD_FLAGS $BUILD_FLAGS" # Build without test ./gradlew $DAEMON_FLAG clean $BUILD_FLAGS diff --git a/android/Samples/KMSample1/build.sh b/android/Samples/KMSample1/build.sh index f6acf82a40..12c72c78b9 100755 --- a/android/Samples/KMSample1/build.sh +++ b/android/Samples/KMSample1/build.sh @@ -66,14 +66,16 @@ if builder_start_action clean:app; then fi if builder_start_action configure:app; then - # Copy Keyman Engine for Android - cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/Samples/KMSample1/app/libs/keyman-engine.aar" builder_finish_action success configure:app fi # Building KMSample1 if builder_start_action build:app; then + + # Copy Keyman Engine for Android + cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/Samples/KMSample1/app/libs/keyman-engine.aar" + ./gradlew clean $SAMPLE_FLAGS builder_finish_action success build:app diff --git a/android/Samples/KMSample2/build.sh b/android/Samples/KMSample2/build.sh index c05df19fe6..100669c251 100755 --- a/android/Samples/KMSample2/build.sh +++ b/android/Samples/KMSample2/build.sh @@ -66,14 +66,15 @@ if builder_start_action clean:app; then fi if builder_start_action configure:app; then - # Copy Keyman Engine for Android - cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/Samples/KMSample2/app/libs/keyman-engine.aar" builder_finish_action success configure:app fi # Building KMSample2 if builder_start_action build:app; then + # Copy Keyman Engine for Android + cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/Samples/KMSample2/app/libs/keyman-engine.aar" + ./gradlew clean $SAMPLE_FLAGS builder_finish_action success build:app diff --git a/android/Tests/KeyboardHarness/build.sh b/android/Tests/KeyboardHarness/build.sh index f37025259f..f1b3f5c097 100755 --- a/android/Tests/KeyboardHarness/build.sh +++ b/android/Tests/KeyboardHarness/build.sh @@ -74,8 +74,6 @@ if builder_start_action clean:app; then fi if builder_start_action configure:app; then - # Copy Keyman Engine for Android - cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/Tests/KeyboardHarness/app/libs/keyman-engine.aar" builder_finish_action success configure:app fi @@ -83,6 +81,9 @@ fi # Building KeyboardHarness if builder_start_action build:app; then + # Copy Keyman Engine for Android + cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/android/Tests/KeyboardHarness/app/libs/keyman-engine.aar" + echo "BUILD_FLAGS: $BUILD_FLAGS" ./gradlew clean $BUILD_FLAGS builder_finish_action success build:app diff --git a/oem/firstvoices/android/build.sh b/oem/firstvoices/android/build.sh index e0312d0e93..75bcfc672a 100755 --- a/oem/firstvoices/android/build.sh +++ b/oem/firstvoices/android/build.sh @@ -74,9 +74,6 @@ if builder_start_action clean; then fi if builder_start_action configure; then - # Copy Keyman Engine for Android - cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/oem/firstvoices/android/app/libs/keyman-engine.aar" - KEYBOARDS_CSV="$KEYMAN_ROOT/oem/firstvoices/keyboards.csv" KEYBOARDS_CSV_TARGET="$KEYMAN_ROOT/oem/firstvoices/android/app/src/main/assets/keyboards.csv" @@ -90,6 +87,9 @@ if builder_start_action configure; then fi if builder_start_action build; then + # Copy Keyman Engine for Android + cp "$KEYMAN_ROOT/android/KMEA/app/build/outputs/aar/keyman-engine-${CONFIG}.aar" "$KEYMAN_ROOT/oem/firstvoices/android/app/libs/keyman-engine.aar" + echo "BUILD_FLAGS: $BUILD_FLAGS" ./gradlew $DAEMON_FLAG clean $BUILD_FLAGS