Android SDK and Xpath and Builds

Posted: January 29, 2010 in Android, Mobile
Tags: ,

The magic of xpath in an Android Application ANT Build script:

<xpath input="AndroidManifest.xml"
expression="/manifest/@android:versionCode" output="android.version.code" />
<xpath input="AndroidManifest.xml"
expression="/manifest/@android:versionName" output="" />
<xpath input="AndroidManifest.xml"
expression="/uses-sdk/@android:minSdkVersion" output="android.sdk.version.min" />

Now you can use those values to pass to your doc generate/report tasks, app versin number update task, etc.

Reblog this post [with Zemanta]
  1. oleksandr says:

    My questions is how to write some value to manifest duaring executing ant build.xml

    for example I would like to write version name duaring every build..

    I have tried

    But it looks that xPath has never been used for that
    any suggestion/advice in this direction?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s