Created
December 12, 2011 14:17
-
-
Save Oshuma/1467395 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target | |
name="run" | |
description="Build and run the app on the default emulator." | |
depends="clean, debug, installd"> | |
<property name="adb" | |
value="${sdk.dir}/platform-tools/adb" /> | |
<property name="main.activity" | |
value="de.nerdno.android/de.nerdno.android.NerdNode" /> | |
<property name="command.opts" | |
value="shell am start -a android.intent.action.MAIN -n ${main.activity}" /> | |
<echo message="Running on emulator..." /> | |
<exec executable="${adb}"> | |
<arg line="${command.opts}" /> | |
</exec> | |
</target> | |
<target | |
name="simulator" | |
description="Start the simulator defined as 'avd.target'."> | |
<fail | |
unless="avd.target" | |
message="Define an 'avd.target' like: ant -Davd.target=target_name simulator" /> | |
<echo message="Running AVD '${avd.target}'..." /> | |
<exec spawn="true" executable="${sdk.dir}/tools/emulator"> | |
<arg line="-avd ${avd.target} -scale 0.8" /> | |
</exec> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment