Hi Paul,

the <setup /> task import the actual build rules from the platform
folder. For example if you are targeting android 1.6 it will import
<SDK>/platforms/android-1.6/templates/android_rules.xml
This is the file that declares the 'debug' and 'release' and other targets.

If you want to customize the build script, do the following (btw, most
of this is in the build.xml comments, which were improved for 1.6)

* change <setup /> to <setup import="false" />. This will run the
setup task to only set some properties, but not import the rules file.
* copy paste the content of the android_rules.xml file from the
platform you are targetting (minus the top level <project> node), and
paste it all in your build.xml file, *after* the call to the setup
task.
* modify the pasted targets to fit your needs.

Xav

On Mon, Sep 21, 2009 at 3:08 PM, Paul Ling Yun <[email protected]> wrote:
>
> Thank you firstly for your reply.
>
> But I still didn't get it. What does the update project process do?
> How many default tasks it will generate? Could it use to build the
> project with ant if I have not my special customize task? What i got
> from this process is an almost empty build.xml with two property
> files. There were only three property tags, one path tags, one taskdef
> tag and one setup tag, neither debug task, nor release task. how can
> it run with ant?
>
> In SDK 1.1, I remember there was a tool that generated most of build
> script for me and I only change the apk sign part. so I can run it
> with ANT to build my project soon.
>
> What's the  Ant plugins?
>
> Paul
>
> On Sep 21, 12:44 pm, "Mark Murphy" <[email protected]> wrote:
>> > I followed the instruction in 1.5 SDK upgrading at link
>> >http://developer.android.com/sdk/1.5_r3/upgrading.html, but i cannot
>> > got the whole build.xml file because there is not any task in it. I
>> > thought the update project process will copy tasks from the
>> > build.xml.old to new build.xml, but it didn't. There is not any hint
>> > mention I should copy it myself in that document. Was the process
>> > failed or I have to copy it myself?
>>
>> The tasks that Android supplies are now held in Ant plugins, so you will
>> not see them in the build.xml file itself. If you created your own Ant
>> tasks, you will need to copy those over.
>>
>> > Do i need do any change for my old
>> > tasks in the new build.xml?
>>
>> That would depend, I suppose, on what those tasks did.
>>
>> --
>> Mark Murphy (a Commons Guy)http://commonsware.com
>> Android App Developer Books:http://commonsware.com/books.html
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to