mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 01:16:40 +00:00
Cherry Pick 5c85d9363482dab5c20f2caf0cbe1d8415d70044
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
|
||||
|
||||
set +e
|
||||
|
||||
bootanim=""
|
||||
failcounter=0
|
||||
timeout_in_sec=600
|
||||
|
||||
until [[ "$bootanim" =~ "stopped" ]]; do
|
||||
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &`
|
||||
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|
||||
|| "$bootanim" =~ "running" ]]; then
|
||||
let "failcounter += 1"
|
||||
echo "Waiting for emulator to start"
|
||||
if [[ $failcounter -gt timeout_in_sec ]]; then
|
||||
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Emulator is ready"
|
||||
@@ -624,31 +624,43 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
||||
echo "TRACKING_APP_VERSION=$TRACKING_APP_VERSION"
|
||||
extra="$extra -Dtracking-app-version=$TRACKING_APP_VERSION"
|
||||
|
||||
ANDROID_SDK_VERSION=r24.0.2
|
||||
BUILD_TOOLS=21.1.2
|
||||
TARGET_API=21
|
||||
BUILD_TOOLS=22.0.0
|
||||
TARGET_API=22
|
||||
TEST_API=18
|
||||
ANDROID_ABI=armeabi-v7a
|
||||
AVD_NAME=androidTest
|
||||
echo "Updating Android SDK...."
|
||||
echo "Updating Android SDK (tools)..."
|
||||
echo yes | android update sdk --filter tools --no-ui --force --all > /dev/null
|
||||
echo "Updating Android SDK (platform-tools)..."
|
||||
echo yes | android update sdk --filter platform-tools --no-ui --force --all > /dev/null
|
||||
echo "Updating Android SDK (build-tools-${BUILD_TOOLS})..."
|
||||
echo yes | android update sdk --filter build-tools-${BUILD_TOOLS} --no-ui --force --all > /dev/null
|
||||
echo "Updating Android SDK (android-${TARGET_API})..."
|
||||
echo yes | android update sdk --filter android-${TARGET_API} --no-ui --force --all > /dev/null
|
||||
echo "Updating Android SDK (extra-android-m2repository)..."
|
||||
echo yes | android update sdk --filter extra-android-m2repository --no-ui --force --all > /dev/null
|
||||
echo "Updating Android SDK (extra-google-m2repository)..."
|
||||
echo yes | android update sdk --filter extra-google-m2repository --no-ui --force --all > /dev/null
|
||||
./gradlew clean build
|
||||
if [[ $? != 0 ]]; then
|
||||
exit 100
|
||||
fi
|
||||
if [ $testing -eq 1 ]; then
|
||||
echo "Downloading and installing emulator image..."
|
||||
adb emu kill
|
||||
echo "Downloading image (sys-img-${ANDROID_ABI}-android-${TEST_API})..."
|
||||
echo yes | android update sdk --filter sys-img-${ANDROID_ABI}-android-${TEST_API} --no-ui --force --all > /dev/null
|
||||
echo no | android create avd --name ${AVD_NAME} --target android-${TEST_API} --abi ${ANDROID_ABI} --force
|
||||
echo "Starting emulator..."
|
||||
emulator -avd ${AVD_NAME} -no-skin -no-audio -no-window &
|
||||
echo "Waiting for device to start..."
|
||||
echo "Waiting for startup..."
|
||||
adb wait-for-device
|
||||
echo "Waiting 10 seconds to complete startup..."
|
||||
sleep 10
|
||||
$PROJECT_HOME/configuration/androidWaitForEmulator.sh
|
||||
if [[ $? != 0 ]]; then
|
||||
adb emu kill
|
||||
android delete avd --name ${AVD_NAME}
|
||||
exit 102
|
||||
fi
|
||||
adb shell input keyevent 82 &
|
||||
./gradlew deviceCheck connectedCheck
|
||||
if [[ $? != 0 ]]; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
buildToolsVersion "21.1.2"
|
||||
buildToolsVersion "22.0.0"
|
||||
compileSdkVersion 21
|
||||
|
||||
defaultConfig {
|
||||
@@ -31,6 +31,10 @@ android {
|
||||
signingConfig signingConfigs.stg_debug
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -4,7 +4,7 @@ def packageName = "com.sap.sailing.android.tracking.app"
|
||||
def verCode = 1
|
||||
|
||||
android {
|
||||
buildToolsVersion "21.1.2"
|
||||
buildToolsVersion "22.0.0"
|
||||
compileSdkVersion 21
|
||||
|
||||
defaultConfig {
|
||||
@@ -60,6 +60,10 @@ android {
|
||||
exclude "META-INF/maven/com.googlecode.json-simple/json-simple/pom.properties"
|
||||
exclude "META-INF/maven/com.googlecode.json-simple/json-simple/pom.xml"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
+2
-4
@@ -45,10 +45,8 @@ public class StartActivity extends BaseActivity {
|
||||
//checkForUpdates();
|
||||
|
||||
int googleServicesResultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
|
||||
if (googleServicesResultCode != ConnectionResult.SUCCESS)
|
||||
{
|
||||
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(googleServicesResultCode, this, 0);
|
||||
dialog.show();
|
||||
if (!BuildConfig.DEBUG && googleServicesResultCode != ConnectionResult.SUCCESS) {
|
||||
GooglePlayServicesUtil.getErrorDialog(googleServicesResultCode, this, 0).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ def packageName = "com.sap.sailing.racecommittee.app"
|
||||
def verCode = 6
|
||||
|
||||
android {
|
||||
buildToolsVersion "21.1.2"
|
||||
buildToolsVersion "22.0.0"
|
||||
compileSdkVersion 21
|
||||
|
||||
defaultConfig {
|
||||
@@ -55,10 +55,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
|
||||
+2
-1
@@ -24,6 +24,7 @@ import com.sap.sailing.domain.base.configuration.DeviceConfigurationIdentifier;
|
||||
import com.sap.sailing.domain.base.configuration.impl.DeviceConfigurationIdentifierImpl;
|
||||
import com.sap.sailing.racecommittee.app.AppConstants;
|
||||
import com.sap.sailing.racecommittee.app.AppPreferences;
|
||||
import com.sap.sailing.racecommittee.app.BuildConfig;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.data.DataManager;
|
||||
import com.sap.sailing.racecommittee.app.data.ReadonlyDataManager;
|
||||
@@ -256,7 +257,7 @@ public class LoginActivity extends BaseActivity implements EventSelectedListener
|
||||
|
||||
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());
|
||||
|
||||
if (resultCode != ConnectionResult.SUCCESS) {
|
||||
if (!BuildConfig.DEBUG && resultCode != ConnectionResult.SUCCESS) {
|
||||
GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices).show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user