Skip to content

Commit

Permalink
Build test for android if sdk available
Browse files Browse the repository at this point in the history
  • Loading branch information
j3k0 committed Oct 25, 2016
1 parent d655e1e commit 5bdf196
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function hasFile() {
fi
}

# Compile for iOS
case "$OSTYPE" in darwin*)
# Compile for iOS
cordova build ios || exit 1

echo
Expand All @@ -104,19 +104,21 @@ case "$OSTYPE" in darwin*)
;; esac

# Compile for Android
cordova build android || exit 1
if [ "_$ANDROID_HOME" != "_" ]; then
cordova build android || exit 1

echo Check Android installation
ANDROID_CLASSES_DIR="$BUILD_DIR/platforms/android/build/intermediates/classes/debug"
ANDROID_MANIFEST="$BUILD_DIR/platforms/android/AndroidManifest.xml"
echo Check Android installation
ANDROID_CLASSES_DIR="$BUILD_DIR/platforms/android/build/intermediates/classes/debug"
ANDROID_MANIFEST="$BUILD_DIR/platforms/android/AndroidManifest.xml"

hasFile "$ANDROID_CLASSES_DIR/com/smartmobilesoftware/inappbilling/InAppBillingPlugin.class"
hasFile "$ANDROID_CLASSES_DIR/com/smartmobilesoftware/inappbilling/InAppBillingPlugin.class"

if grep "com.android.vending.BILLING" "$ANDROID_MANIFEST" > /dev/null; then
echo "BILLING permission added."
else
echo "ERROR: Not BILLING permission."
EXIT=1
if grep "com.android.vending.BILLING" "$ANDROID_MANIFEST" > /dev/null; then
echo "BILLING permission added."
else
echo "ERROR: Not BILLING permission."
EXIT=1
fi
fi

if [ "x$EXIT" != "x1" ]; then echo "Great! Everything looks good."; fi
Expand Down

0 comments on commit 5bdf196

Please sign in to comment.