mirror of https://github.com/BTCPrivate/copay.git
Changes for building a release apk
This commit is contained in:
parent
d37fb96836
commit
0aba7df3ff
|
@ -54,6 +54,7 @@ android/package
|
||||||
android/*.apk
|
android/*.apk
|
||||||
android/*.keystore
|
android/*.keystore
|
||||||
|
|
||||||
|
mobile/*.keystore
|
||||||
mobile/assets/www
|
mobile/assets/www
|
||||||
mobile/bin
|
mobile/bin
|
||||||
mobile/gen
|
mobile/gen
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="1.0" android:windowSoftInputMode="adjustPan" package="com.bipay.copay" xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest android:hardwareAccelerated="true" android:versionCode="3" android:versionName="0.4.1" android:windowSoftInputMode="adjustPan" package="com.bitpay.copay" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
|
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
|
|
@ -20,12 +20,12 @@ checkOK() {
|
||||||
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
APPDIR="$BUILDDIR/assets/www"
|
APPDIR="$BUILDDIR/assets/www"
|
||||||
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
|
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
|
||||||
DEBUG=""
|
RELEASE=false
|
||||||
RUN=false
|
RUN=false
|
||||||
|
|
||||||
if [[ $1 = "-d" ]]
|
if [[ $1 = "--release" ]]
|
||||||
then
|
then
|
||||||
DEBUG="--enable-remote-debugging"
|
RELEASE=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 = "-r" ]]
|
if [[ $1 = "-r" ]]
|
||||||
|
@ -33,17 +33,6 @@ then
|
||||||
RUN=true
|
RUN=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $# -eq 1 && ! $1 = "-d" && ! $1 = "-r" ]]
|
|
||||||
then
|
|
||||||
if [ ! -f $BUILDDIR/copay.keystore ]
|
|
||||||
then
|
|
||||||
echo "${OpenColor}${Red}* Can't build production app without a keystore${CloseColor}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
PRODUCTION="--keystore-path=$BUILDDIR/copay.keystore --keystore-alias=copay_play --keystore-passcode=$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Move to the build directory
|
# Move to the build directory
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
|
|
||||||
|
@ -64,7 +53,6 @@ checkOK
|
||||||
|
|
||||||
# Copy all app files
|
# Copy all app files
|
||||||
echo "${OpenColor}${Green}* Copying all app files...${CloseColor}"
|
echo "${OpenColor}${Green}* Copying all app files...${CloseColor}"
|
||||||
# sed "s/APP_VERSION/$VERSION/g" manifest.json > $APPDIR/manifest.json
|
|
||||||
cd $BUILDDIR/..
|
cd $BUILDDIR/..
|
||||||
cp -af {css,font,img,js,lib,sound,config.js,version.js,$BUILDDIR/cordova.js,$BUILDDIR/cordova_plugins.js,$BUILDDIR/plugins} $APPDIR
|
cp -af {css,font,img,js,lib,sound,config.js,version.js,$BUILDDIR/cordova.js,$BUILDDIR/cordova_plugins.js,$BUILDDIR/plugins} $APPDIR
|
||||||
checkOK
|
checkOK
|
||||||
|
@ -77,6 +65,9 @@ cd $BUILDDIR
|
||||||
if [[ $RUN == true ]]
|
if [[ $RUN == true ]]
|
||||||
then
|
then
|
||||||
./cordova/run
|
./cordova/run
|
||||||
|
elif [[ $RELEASE == true ]]
|
||||||
|
then
|
||||||
|
./cordova/build --release
|
||||||
else
|
else
|
||||||
./cordova/build
|
./cordova/build
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -13,3 +13,5 @@
|
||||||
android.library.reference.1=CordovaLib
|
android.library.reference.1=CordovaLib
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-19
|
target=android-19
|
||||||
|
key.store=copay.keystore
|
||||||
|
key.alias=copay_play
|
Loading…
Reference in New Issue