You can have a variable in a properties file (is_production = true/false), and have a Java class that reads this file and switches the URL accordingly.
In your build.xml, you can also check this variable, and name the output apk accordingly. Refer this link : http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Fri, Apr 29, 2011 at 2:12 AM, Sunil Lakhiyani < slakhiyaniandr...@gmail.com> wrote: > yes i do. > can you please tell what do you want to say? > how do i change url using ant, as url is in java file. > > On Thu, Apr 28, 2011 at 12:48 PM, Kumar Bibek <coomar....@gmail.com>wrote: > >> Do you know ant scripts? >> >> Kumar Bibek >> http://techdroid.kbeanie.com >> http://www.kbeanie.com >> >> >> >> On Fri, Apr 29, 2011 at 1:16 AM, Sunil Lakhiyani < >> slakhiyaniandr...@gmail.com> wrote: >> >>> Hello Developers, >>> >>> I am building an app using jenkins/ hudson. My application is using 2 >>> URLs, first for lab testing and another one is for production. >>> We have 2 teams one is in US and another one is in JAPAN for testing. >>> So I need to create 2 apks same time. >>> Right now what I am doing is >>> >>> I change my file to point LAB url and build it. name the apk as >>> *-lab-release.apk. >>> >>> then >>> >>> I change my file to point PRODUCTION url and build it. name the apk as >>> *-prod-release.apk. >>> >>> is there any dynamic way to read URL ? for example can i read URL from >>> any XML file dynamically during build process? >>> >>> >>> Thanks >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to android-developers@googlegroups.com >>> To unsubscribe from this group, send email to >>> android-developers+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en