ant scripts to build apk file and load it in a emulator?

by jrichards1...@googlemail.com » Mon, 19 Jul 2010 16:52:20 GMT


Sponsored Links
 i.

i am trying to create a build.xml script that cleans, builds and
creates a apk file of a Junit android test project that i have
created.

the steps i want to achieve in my build file is this:

[list=]clean[/list]
[list=]build[/list]
[list=]create apk file[/list]
[list=]Sign apk file[/list]
[list=]launch emulator[/list]
[list=]install apk file[/list]
[list=]run instrumentalTest[/list]
[list=]Save the tests into an HTML Junit Report[/list]

Anyone know how to achieve this? so far my build file looks like this:

[code]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply

create one in the same
directory with the processing instruction <?

eclipse.ant.import?>
as the first entry and export the buildfile again.

-->
<project basedir="." default="build" name="Unity Agent SDK Test">
<property environment="env" />
<property name="junit.output.dir" value="junit" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.6" />
<property name="source" value="1.6" />
<property file="build.properties" />
<path id="android1.6.userclasspath">
<pathelement location="lib/android.jar" />
</path>
<path id="Junit.userclasspath">
<pathelement location="lib/junit-4.8.2" />
<pathelement location="lib/
org.hamcrest.core_1.1.0.v20090501071000.jar" />
</path>
<path id="Unity Agent SDK Test.classpath">
<pathelement location="bin" />
<pathelement location="lib/fb_connect-android-api.jar" />
<pathelement location="lib/signpost-commonshttp4-1.2.jar" />
<pathelement location="lib/signpost-core-1.2.jar" />
<pathelement location="lib/UnityAgentSDK.jar" />
<path refid="android1.6.userclasspath" />
<path refid="Junit.userclasspath" />
</path>

<path id="android.antlibs">
<pathelement path="${android-sdk-path}/tools/lib/anttasks.jar"
/>
<pathelement path="${android-sdk-path}/tools/lib/sdklib.jar" />
<pathelement
path="${android-sdk-path}/tools/lib/androidprefs.jar" /
<pathelement
path="${android-sdk-path}/tools/lib/apkbuilder.jar" />
<pathelement path="${android-sdk-path}/tools/lib/jarutils.jar"
/>
</path>

<path id="run.Unity Agent SDK Test (1).classpath">
<path refid="Unity Agent SDK Test.classpath" />
</path>
<path id="run.Unity Agent SDK Test (1).bootclasspath" />
<target name="init



Other Threads

1. How can we Print Soap Object response in web services

Hi

How can we print the SoapObject response without converting into
toString() format .....

i need to print the soap envelope Object reposne directly in the XML
form How can i get it?

or that Soap Object should write in a File ?

thanks in advance........
--~--~---------~--~----~------------~-------~--~----~

2. How to release resources when application ends?

The code is quite complex. To simplify the question I would like to know if
there is any function that terminates all the processes which were running
inside the application.

If I make a method obButtonExit() and bind it to a custom button, which
existing methods should be called inside the onButtonExit() in order to
release all the resources used by the running activity and terminate all the
processes?

Regards,

Niko








-- 
http://mypetprojects.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~

3. onTouchListener problem: trying to move a view

4. What is the best way to implement dynamic textures in OpenGL ES?

5. Camera preview and sensor orientation values

6. How drawing cache in View works

7. A question regarding Activities and Tasks.