diff options
author | Keith Packard <keithp@keithp.com> | 2012-01-01 11:21:49 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-01-01 11:21:49 -0800 |
commit | 64bd4c93e760b6b82ce21f8101fe57242a302a00 (patch) | |
tree | cabdeba8073616ce5a9125b15eed52d26124bc16 | |
parent | 4104c8c94ccf3598bc5c46c946098050b093d7e8 (diff) |
Use ant for now
apkbuilder isn't supported any longer, so it doesn't appear possible
to build with make until some replacement shell tool is created.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | Makefile | 56 | ||||
-rw-r--r-- | ant.properties | 4 | ||||
-rw-r--r-- | build.xml | 2 |
3 files changed, 18 insertions, 44 deletions
@@ -1,5 +1,4 @@ -SDK=/home/keithp/src/android/android-sdk-linux -PWD=/home/keithp/src/android/AltosDroid +SDK=../android-sdk-linux DX=$(SDK)/platform-tools/dx ADB=$(SDK)/platform-tools/adb @@ -7,55 +6,26 @@ AAPT=$(SDK)/platform-tools/aapt APKBUILDER=$(SDK)/tools/apkbuilder ZIPALIGN=$(SDK)/tools/zipalign -PLATFORM=$(SDK)/platforms/android-10 -PLATFORM_JAR=$(PLATFORM)/android.jar -ADDONS=$(SDK)/add-ons/addon-google_apis-google_inc_-10/libs -TOOLS_LIB=$(SDK)/tools/lib -CLASSPATH=".:$(PLATFORM)/*:$(TOOLS_LIB)/*" -CLASSES=bin/classes SRC_DIR=src/org/altusmetrum/AltosDroid -GEN_DIR=gen/org/altusmetrum/AltosDroid -JAVAC=javac -BOOTCLASSPATH=$(PLATFORM_JAR):$(ADDONS)/usb.jar:$(ADDONS)/maps.jar - -JAVACFLAGS=\ - -d $(CLASSES) \ - -classpath $(CLASSES):. \ - -sourcepath src:gen \ - -target 1.5 \ - -bootclasspath $(BOOTCLASSPATH) \ - -encoding UTF-8 \ - -g \ - -source 1.5 SRC=\ $(SRC_DIR)/AltosDroid.java \ $(SRC_DIR)/BluetoothChatService.java \ - $(SRC_DIR)/DeviceListActivity.java \ - $(GEN_DIR)/R.java + $(SRC_DIR)/DeviceListActivity.java -all: align.stamp +all: bin/AltosDroid-debug.apk bin/AltosDroid-release.apk -install: AltosDroid.apk - $(ADB) -e install -r AltosDroid.apk +install-release: bin/AltosDroid-release.apk + $(ADB) install -r bin/AltosDroid-release.apk -$(GEN_DIR)/R.java: resources.stamp +install-debug: bin/AltosDroid-debug.apk + $(ADB) install -r bin/AltosDroid-debug.apk -resources.stamp: Makefile - mkdir -p res libs bin bin/res bin/classes gen assets - $(AAPT) package -f -m -M $(PWD)/AndroidManifest.xml -S $(PWD)/bin/res -S $(PWD)/res -I $(PLATFORM_JAR) -J $(PWD)/gen --generate-dependencies && touch $@ +bin/AltosDroid-debug.apk: $(SRC) + ant debug -class.stamp: $(SRC) - $(JAVAC) $(JAVACFLAGS) $(SRC) && touch $@ +bin/AltosDroid-release.apk: $(SRC) + ant release -dex.stamp: Makefile class.stamp - $(DX) --dex --output bin/classes.dex bin/classes && touch $@ - -crunch.stamp: Makefile dex.stamp - $(AAPT) crunch -v -S res -C bin/res - -package.stamp: Makefile crunch.stamp - $(AAPT) package --no-crunch -f --debug-mode -M $(PWD)/AndroidManifest.xml -S $(PWD)/bin/res -S $(PWD)/res -A $(PWD)/assets -I $(PLATFORM_JAR) -F $(PWD)/bin/activity.ap_ --generate-dependencies && touch $@ - -align.stamp: Makefile package.stamp - $(ZIPALIGN) -f 4 bin/activity-debug-unaligned.apk bin/activity-debug.apk && touch $@
\ No newline at end of file +clean: + ant clean
\ No newline at end of file diff --git a/ant.properties b/ant.properties index ee52d86..5c19441 100644 --- a/ant.properties +++ b/ant.properties @@ -15,3 +15,7 @@ # 'key.alias' for the name of the key to use. # The password will be asked during the build when you use the 'release' target. +key.store=keystore +key.alias=bob +key.store.password=altusmetrum +key.alias.password=altusmetrum @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<project name="activity" default="help"> +<project name="AltosDroid" default="help"> <!-- The local.properties file is created and updated by the 'android' tool. It contains the path to the SDK. It should *NOT* be checked into |