cd ../../
. gradle.properties
basepath=$(cd `dirname $0`; pwd)
project_name=${basepath##*/}

cd ../hooker/

sed -i "" "s#^app_id=.*#app_id=${app_id}#g"  gradle.properties
sed -i "" "s#^signing_keyAlias=.*#signing_keyAlias=${signing_keyAlias}#g"  gradle.properties
sed -i "" "s#^signing_certificate=.*#signing_certificate=../../${project_name}/jks/${signing_keyAlias}.keystore#g"  gradle.properties
sed -i "" "s#^signging_certificatePassword=.*#signging_certificatePassword=${signging_certificatePassword}#g"  gradle.properties
sed -i "" "s#^signging_storePassword=.*#signging_storePassword=${signging_storePassword}#g"  gradle.properties

./gradlew clean
./gradlew assembleRelease
now_time=$(date "+%Y-%m-%d %H_%M_%S")
cp app/build/outputs/apk/app/release/app-app-release.apk /Users/connor/Documents/apks/"${project_name}"_tool_"${now_time}".apk