Mercurial > 510ConnectbotMonitor
diff Makefile @ 27:807f7e4eaebe
starting update to latest toolchain
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 08 Nov 2018 11:39:13 -0800 |
parents | 357bbbbcf201 |
children | e6784ab8964c |
line wrap: on
line diff
--- a/Makefile Fri May 01 12:34:17 2015 -0700 +++ b/Makefile Thu Nov 08 11:39:13 2018 -0800 @@ -1,13 +1,22 @@ #mc40 is "On Device Storage" #tc55 is "Internal Storage" -style=release -dest=/run/user/1000/gvfs/mtp*/*torage/Download -apk='bin/510ConnectbotMonitor-$(style).apk' +style:=release +dest:=/run/user/1000/gvfs/mtp*/*torage/Download +ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2) +apk:='app/build/outputs/apk/510ConnectbotMonitor-$(ver).apk' +id:=$(shell hg id --id || echo 1) +da:=$(shell date +%Y-%m-%d) +version:=\ +<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\ +<resources>\n\ + <string name=\"msg_version\" translatable=\"false\">510ConnectbotMonitor $(ver) ($(id) $(da))</string>\n\ +</resources>\n + ifeq ($(style),release) - debuggable=false + task:=assembleArmRelease else - debuggable=true + task:=assembleArmDebug endif all: @@ -15,10 +24,15 @@ make builder builder: - sed -i -e 's/android:debuggable=".*"/android:debuggable="$(debuggable)"/g' AndroidManifest.xml - rm -rf gen bin - android update project -p . -t android-16 - ant $(style) + rm -rf app/build/* + echo -e "$(version)" >app/src/main/res/values/version.xml + cat app/src/main/res/values/version.xml + ANDROID_HOME=/home/carl/Android/Sdk ANDROID_NDK_HOME=/home/carl/Android/Sdk/ndk-bundle ./gradlew $(task) + mv app/build/outputs/apk/arm/$(style)/app-arm-$(style).apk $(apk) + ls -al app/build/outputs/apk + +docs: + (cd xml; make) install: cp $(apk) $(dest)