SDL: switched build system from Ant to Gradle, because Google forced this piece of shit on me with SDK update

If you are getting build errors, delete the directory project/app/build
This commit is contained in:
Sergii Pylypenko
2017-09-26 23:27:43 +03:00
parent 5223f423d8
commit 4701548e01
24 changed files with 351 additions and 1364 deletions

3
.gitignore vendored
View File

@@ -19,3 +19,6 @@
/project/jni/android-support
/project/res/drawable/banner.png
/project/res/drawable-xhdpi/ouya_icon.png
/project/app/build.gradle
/project/app/.gradle
/project/app/build

View File

@@ -93,7 +93,10 @@ else
fi
[ -e project/local.properties ] || {
android update project -p project -t android-25 || exit 1
android update project -p project -t android-25 || {
echo "Create file project/local.properties and put there sdk.dir=/path/to/android/sdk"
exit 1
}
rm -f project/src/Globals.java
}
@@ -177,32 +180,28 @@ cd project && env PATH=$NDKBUILDPATH BUILD_NUM_CPUS=$NCPU nice -n19 ndk-build -j
{ if $build_release ; then \
$quick_rebuild && { \
ln -s -f libs lib ; \
zip -u -r bin/MainActivity-release-unsigned.apk lib assets || exit 1 ; \
} || ant release || exit 1 ; \
zip -u -r app/build/outputs/apk/app-release-unsigned.apk lib assets || exit 1 ; \
} || ./gradlew assembleRelease || exit 1 ; \
[ '!' -x jni/application/src/AndroidPostBuild.sh ] || {
cd jni/application/src ; \
./AndroidPostBuild.sh `pwd`/../../../bin/MainActivity-release-unsigned.apk || exit 1 ; \
./AndroidPostBuild.sh `pwd`/../../../app/build/outputs/apk/app-release-unsigned.apk || exit 1 ; \
cd ../../.. ; \
} || exit 1 ; \
jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -sigalg MD5withRSA -digestalg SHA1 bin/MainActivity-release-unsigned.apk androiddebugkey || exit 1 ; \
rm -f bin/MainActivity-debug.apk ; \
zipalign 4 bin/MainActivity-release-unsigned.apk bin/MainActivity-debug.apk || exit 1 ; \
jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -sigalg MD5withRSA -digestalg SHA1 app/build/outputs/apk/app-release-unsigned.apk androiddebugkey || exit 1 ; \
rm -f app/build/outputs/apk/app-release.apk ; \
zipalign 4 app/build/outputs/apk/app-release-unsigned.apk app/build/outputs/apk/app-release.apk || exit 1 ; \
else \
$quick_rebuild && { \
ln -s -f libs lib ; \
zip -u -r bin/MainActivity-debug-unaligned.apk lib assets || exit 1 ; \
jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -sigalg MD5withRSA -digestalg SHA1 bin/MainActivity-debug-unaligned.apk androiddebugkey || exit 1 ; \
rm -f bin/MainActivity-debug.apk ; \
zipalign 4 bin/MainActivity-debug-unaligned.apk bin/MainActivity-debug.apk || exit 1 ; \
} || ant debug || exit 1 ; \
./gradlew assembleDebug && \
mv -f app/build/outputs/apk/app-debug.apk app/build/outputs/apk/app-release.apk \
|| exit 1 ; \
fi ; } && \
{ if $sign_apk; then cd .. && ./sign.sh && cd project ; else true ; fi ; } && \
{ $install_apk && [ -n "`adb devices | tail -n +2`" ] && \
{ cd bin && adb install -r MainActivity-debug.apk | grep 'Failure' && \
adb uninstall `grep AppFullName ../../AndroidAppSettings.cfg | sed 's/.*=//'` && adb install -r MainActivity-debug.apk ; } ; \
{ adb install -r app/build/outputs/apk/app-release.apk | grep 'Failure' && \
adb uninstall `grep AppFullName ../AndroidAppSettings.cfg | sed 's/.*=//'` && adb install -r app/build/outputs/apk/app-release.apk ; } ; \
true ; } && \
{ $run_apk && { \
ActivityName="`grep AppFullName ../../AndroidAppSettings.cfg | sed 's/.*=//'`/.MainActivity" ; \
ActivityName="`grep AppFullName ../AndroidAppSettings.cfg | sed 's/.*=//'`/.MainActivity" ; \
RUN_APK="adb shell am start -n $ActivityName" ; \
echo "Running $ActivityName on the USB-connected device:" ; \
echo "$RUN_APK" ; \

File diff suppressed because it is too large Load Diff

View File

@@ -809,6 +809,10 @@ else
cat $F | sed "s/^package .*;/package $AppFullName;/" >> project/src/Advertisement.java
fi
cat project/app/build-template.gradle | \
sed 's/applicationId .*/applicationId "'"$AppFullName"'"/' > \
project/app/build.gradle
echo "-keep class $AppFullName.** { *; }" > project/proguard-local.cfg
if [ "$AppRecordsAudio" = "n" -o -z "$AppRecordsAudio" ] ; then
@@ -844,8 +848,6 @@ if [ -z "$AppOpenFileExtension" ]; then
$SEDI "/==OPENFILE==/ d" project/AndroidManifest.xml
else
EXTS="`for EXT in $AppOpenFileExtension; do echo -n '\\\\1'$EXT'\\\\2' ; done`"
echo "EXTS $EXTS"
#$SEDI "s/\(.*\)==OPENFILE-EXT==\(.*\)/$EXTS/g" project/AndroidManifest.xml
$SEDI "s/\(.*\)==OPENFILE-EXT==\(.*\)/$EXTS/g" project/AndroidManifest.xml
fi
@@ -1095,6 +1097,7 @@ done
done
rm -rf project/bin/classes
rm -rf project/bin/res
rm -rf project/app/build
# Generate OUYA icon, for that one user who still got an OUYA in his living room and won't throw it away just because someone else decides that it's dead
rm -rf project/res/drawable-xhdpi/ouya_icon.png

View File

@@ -7,7 +7,6 @@
>
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:debuggable="true"
android:allowBackup="true"
android:banner="@drawable/banner"
android:isGame="true"

View File

@@ -0,0 +1,19 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "net.olofson.ballfield"
minSdkVersion 9
targetSdkVersion 25
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

View File

@@ -0,0 +1 @@
../../../AndroidManifest.xml

1
project/app/src/main/assets Symbolic link
View File

@@ -0,0 +1 @@
../../../assets

1
project/app/src/main/java Symbolic link
View File

@@ -0,0 +1 @@
../../../src/

View File

@@ -0,0 +1 @@
../../../libs/

1
project/app/src/main/res Symbolic link
View File

@@ -0,0 +1 @@
../../../res

15
project/build.gradle Normal file
View File

@@ -0,0 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
allprojects {
repositories {
jcenter()
}
}

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

160
project/gradlew vendored Executable file
View File

@@ -0,0 +1,160 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
project/gradlew.bat vendored Normal file
View File

@@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -392,7 +392,7 @@ public class MainActivity extends Activity
layout.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
layout.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
ImageView borderLeft = new ImageView(this);
borderLeft.setId(R.drawable.b1); // Any random ID
borderLeft.setId(R.id.left); // Any random ID
borderLeft.setImageResource(R.drawable.tv_border_left);
borderLeft.setScaleType(ImageView.ScaleType.FIT_XY);
view.addView(borderLeft, layout);
@@ -401,7 +401,7 @@ public class MainActivity extends Activity
layout.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
layout.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
ImageView borderRight = new ImageView(this);
borderRight.setId(R.drawable.b2);
borderRight.setId(R.id.right);
borderRight.setImageResource(R.drawable.tv_border_left);
borderRight.setScaleType(ImageView.ScaleType.FIT_XY);
borderRight.setScaleX(-1f);
@@ -412,7 +412,7 @@ public class MainActivity extends Activity
layout.addRule(RelativeLayout.RIGHT_OF, borderLeft.getId());
layout.addRule(RelativeLayout.LEFT_OF, borderRight.getId());
ImageView borderTop = new ImageView(this);
borderTop.setId(R.drawable.b3);
borderTop.setId(R.id.top);
borderTop.setImageResource(R.drawable.tv_border_top);
borderTop.setScaleType(ImageView.ScaleType.FIT_XY);
view.addView(borderTop, layout);
@@ -422,7 +422,7 @@ public class MainActivity extends Activity
layout.addRule(RelativeLayout.RIGHT_OF, borderLeft.getId());
layout.addRule(RelativeLayout.LEFT_OF, borderRight.getId());
ImageView borderBottom = new ImageView(this);
borderBottom.setId(R.drawable.b4);
borderBottom.setId(R.id.bottom);
borderBottom.setImageResource(R.drawable.tv_border_top);
borderBottom.setScaleType(ImageView.ScaleType.FIT_XY);
borderBottom.setScaleY(-1f);
@@ -867,8 +867,8 @@ public class MainActivity extends Activity
screenKeyboard.setText(oldText);
screenKeyboard.setSelection(screenKeyboard.getText().length());
screenKeyboard.setOnKeyListener(new simpleKeyListener(this));
screenKeyboard.setBackgroundColor(this.getColor(android.R.color.primary_text_light));
screenKeyboard.setTextColor(this.getColor(android.R.color.background_light)); // Just to be sure about gamma
screenKeyboard.setBackgroundColor(this.getResources().getColor(android.R.color.primary_text_light));
screenKeyboard.setTextColor(this.getResources().getColor(android.R.color.background_light)); // Just to be sure about gamma
if( isRunningOnOUYA() && Globals.TvBorders )
screenKeyboard.setPadding(100, 100, 100, 100); // Bad bad HDMI TVs all have cropped borders
_screenKeyboard = screenKeyboard;

View File

@@ -197,8 +197,6 @@
<string name="gamehelper_unknown_error">未知错误。</string>
<string name="accessing_network">正在访问网络,请稍候</string>
<string name="google_play_game_services_app_id" translatable="false">==GOOGLEPLAYGAMESERVICES_APP_ID==</string>
<string name="restarting_please_wait">重新启动中,请稍候。</string>
<string name="notification_app_is_running">%s 正在运行中</string>

View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation">
<string name="app_name">Commander Genius</string>

View File

@@ -255,7 +255,7 @@ APP_PLATFORM=
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a
MultiABI='armeabi-v7a' # x86 arm64-v8a
MultiABI='armeabi-v7a'
# Optional shared libraries to compile - removing some of them will save space
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="left" type="id" />
<item name="right" type="id" />
<item name="top" type="id" />
<item name="bottom" type="id" />
</resources>

1
project/settings.gradle Normal file
View File

@@ -0,0 +1 @@
include ':app'

View File

@@ -8,11 +8,11 @@ APPVER=`grep AppVersionName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' |
if false; then
cd project/bin
cd project/app/build/outputs/apk/
# Remove old certificate
rm -f Signed.apk
cp -f MainActivity-debug.apk Signed.apk
cp -f app-release.apk Signed.apk
zip -d Signed.apk "META-INF/*"
# Sign with the new certificate
echo Using keystore $ANDROID_KEYSTORE_FILE and alias $ANDROID_KEYSTORE_ALIAS
@@ -21,10 +21,10 @@ read PW
jarsigner -verbose -tsa http://timestamp.digicert.com -keystore $ANDROID_KEYSTORE_FILE -sigalg MD5withRSA -digestalg SHA1 Signed.apk $ANDROID_KEYSTORE_ALIAS -storepass "$PW" -keypass "$PW" || exit 1
stty echo
echo
rm -f MainActivity-debug.apk
zipalign 4 Signed.apk MainActivity-debug.apk
rm -f app-release.apk
zipalign 4 Signed.apk app-release.apk
rm -f Signed.apk
cp -f MainActivity-debug.apk ../../$APPNAME-$APPVER.apk
cp -f app-release.apk ../../../../../$APPNAME-$APPVER.apk
if false; then
#DEBUGINFODIR=`aapt dump badging App.apk | grep "package:" | sed "s/.*name=[']\([^']*\)['].*versionCode=[']\([^']*\)['].*/\1-\2/" | tr " '/" '---'`
@@ -33,10 +33,10 @@ echo Copying debug info to project/debuginfo/$DEBUGINFODIR
mkdir -p ../debuginfo/$DEBUGINFODIR/x86 ../debuginfo/$DEBUGINFODIR/armeabi-v7a
cp -f ../obj/local/x86/*.so ../debuginfo/$DEBUGINFODIR/x86
cp -f ../obj/local/armeabi-v7a/*.so ../debuginfo/$DEBUGINFODIR/armeabi-v7a
cp -f MainActivity-debug.apk ../debuginfo/$DEBUGINFODIR/$APPNAME-$APPVER.apk
cp -f app-release.apk ../debuginfo/$DEBUGINFODIR/$APPNAME-$APPVER.apk
fi
cd ../..
cd ../../../../../
fi

14
sign.sh
View File

@@ -6,11 +6,11 @@
APPNAME=`grep AppName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' | tr " '/" '---'`
APPVER=`grep AppVersionName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' | tr " '/" '---'`
cd project/bin
cd project/app/build/outputs/apk/
# Remove old certificate
rm -f Signed.apk
cp -f MainActivity-debug.apk Signed.apk
cp -f app-release.apk Signed.apk
zip -d Signed.apk "META-INF/*"
# Sign with the new certificate
echo Using keystore $ANDROID_KEYSTORE_FILE and alias $ANDROID_KEYSTORE_ALIAS
@@ -18,10 +18,10 @@ stty -echo
jarsigner -verbose -tsa http://timestamp.digicert.com -keystore $ANDROID_KEYSTORE_FILE -sigalg MD5withRSA -digestalg SHA1 Signed.apk $ANDROID_KEYSTORE_ALIAS || exit 1
stty echo
echo
rm -f MainActivity-debug.apk
zipalign 4 Signed.apk MainActivity-debug.apk
rm -f app-release.apk
zipalign 4 Signed.apk app-release.apk
rm -f Signed.apk
cp -f MainActivity-debug.apk ../../$APPNAME-$APPVER.apk
cp -f app-release.apk ../../../../../$APPNAME-$APPVER.apk
if false; then
#DEBUGINFODIR=`aapt dump badging App.apk | grep "package:" | sed "s/.*name=[']\([^']*\)['].*versionCode=[']\([^']*\)['].*/\1-\2/" | tr " '/" '---'`
@@ -30,12 +30,12 @@ echo Copying debug info to project/debuginfo/$DEBUGINFODIR
mkdir -p ../debuginfo/$DEBUGINFODIR/x86 ../debuginfo/$DEBUGINFODIR/armeabi-v7a
cp -f ../obj/local/x86/*.so ../debuginfo/$DEBUGINFODIR/x86
cp -f ../obj/local/armeabi-v7a/*.so ../debuginfo/$DEBUGINFODIR/armeabi-v7a
cp -f MainActivity-debug.apk ../debuginfo/$DEBUGINFODIR/$APPNAME-$APPVER.apk
cp -f app-release.apk ../debuginfo/$DEBUGINFODIR/$APPNAME-$APPVER.apk
fi
if false; then
if [ -n "$ANDROID_UPLOAD_KEYSTORE_FILE" ]; then
cd ../..
cd ../../../../../
cp -f $APPNAME-$APPVER.apk $APPNAME-$APPVER-upload1.apk
# Sign with the upload certificate
echo Using keystore $ANDROID_UPLOAD_KEYSTORE_FILE and alias $ANDROID_UPLOAD_KEYSTORE_ALIAS