diff --git a/application/.classpath b/application/.classpath index 609aa00..4160c21 100644 --- a/application/.classpath +++ b/application/.classpath @@ -1,7 +1,8 @@ + - - + + diff --git a/application/build.properties b/application/build.properties deleted file mode 100644 index d624cd9..0000000 --- a/application/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Output directory for builds -out.dir=../builds/ant/ diff --git a/application/build.xml b/application/build.xml index 9ee3761..0f2cb29 100644 --- a/application/build.xml +++ b/application/build.xml @@ -1,20 +1,85 @@ - - - - + - - - - - + + - + + + + + + + + + + + + + + + + diff --git a/application/proguard.cfg b/application/proguard.cfg new file mode 100644 index 0000000..b1cdf17 --- /dev/null +++ b/application/proguard.cfg @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/application/default.properties b/application/project.properties similarity index 64% rename from application/default.properties rename to application/project.properties index 19c9665..c957743 100644 --- a/application/default.properties +++ b/application/project.properties @@ -1,13 +1,11 @@ # This file is automatically generated by Android Tools. # Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# +# # This file must be checked in Version Control Systems. -# +# # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. -# Indicates whether an apk should be generated for each density. -split.density=false # Project target. target=android-4 diff --git a/build.conf.sample b/build.conf.sample deleted file mode 100644 index 87832b7..0000000 --- a/build.conf.sample +++ /dev/null @@ -1,14 +0,0 @@ -# The keystore file you use for the release -KEYSTORE= - -# The directory you want the builds to go -BUILD_DIRECTORY=builds/ant - -# The key of the keystore you want to use to sign the release -RELEASE_KEY= - -# The path to your Android SDK -ANDROID_SDK= - -# The AVD for running the unit and scenario tests -AVD_TEST= diff --git a/release.sh b/release.sh deleted file mode 100755 index 8ca291b..0000000 --- a/release.sh +++ /dev/null @@ -1,30 +0,0 @@ -#### -# Build a new release -# -# - Modify build.conf as needed -# - Usage: ./build_release.sh - -if [ ! -f build.conf ]; then - echo "Config file missing: build.conf" - echo "Modify the build.conf.sample file and save it as build.conf" - exit 1 -fi - -. build.conf - -if [ -z $1 ]; then - echo "Release version is missing." - echo "Usage: ./build_release.sh " - exit 1 -fi - -echo "Building yaaic $1" -echo "" -cd application -ant release -cd .. -jarsigner -verbose -keystore $KEYSTORE "$BUILD_DIRECTORY/Yaaic-unsigned.apk" release -jarsigner -verify "$BUILD_DIRECTORY/Yaaic-unsigned.apk" -"$ANDROID_SDK/tools/zipalign" -v 4 "$BUILD_DIRECTORY/Yaaic-unsigned.apk" "$BUILD_DIRECTORY/yaaic-$1.apk" -echo "" -echo "Build ready: $BUILD_DIRECTORY/yaaic-$1.apk" diff --git a/test.sh b/test.sh deleted file mode 100755 index 26edcc6..0000000 --- a/test.sh +++ /dev/null @@ -1,35 +0,0 @@ -### -# Run all unit and scenario tests -# -# TODO: -# - Build new version of Yaaic and Tests -# - Start device with -wipe-data -# - Deploy both APKs to device -# - -if [ ! -f build.conf ]; then - echo "Config file missing: build.conf" - echo "Modify the build.conf.sample file and save it as build.conf" - exit 1 -fi - -. build.conf - -echo "Starting emulator" -"$ANDROID_SDK"/tools/emulator -avd "$AVD_TEST" & - -sleep 40 - -echo "Unlocking emulator" -echo "event send EV_KEY:KEY_MENU:1 EV_KEY:KEY_MENU:0" | telnet localhost 5554 - -sleep 5 - -echo "Running tests" -"$ANDROID_SDK"/platform-tools/adb -e shell "am instrument -w org.yaaic.test/android.test.InstrumentationTestRunner" - -sleep 3 - -echo "Killing emulator" -kill $(jobs -p) -