Upgrade to Pro — share decks privately, control downloads, hide ads and more …

My one day project

My one day project

unfinished picasa app~

Oursky Limited

December 19, 2011
Tweet

More Decks by Oursky Limited

Other Decks in Programming

Transcript

  1. Apache Ant Apache Ant is a software tool for automating

    software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects. The most immediately noticeable difference between Ant and Make is that Ant uses XML to describe the build process and its dependencies, whereas Make uses Makefile format. By default the XML file is named build.xml.
  2. Ant and Android Build APK: • ant debug • ant

    release Custom task: • multi target ◦ different package name for dev and production ◦ regex replace in ▪ AndroidManifest.xml ▪ app name, package name ▪ import {package}.R
  3. Sample Custom build for chinese market <target name="replace_market_and_build" description="build for

    chinese market" > <replaceregexp flags="g" byline="false"> <regexp pattern="meta-data android:value=&quot;.*&quot; android:name=&quot; UMENG_CHANNEL&quot;" /> <substitution expression="meta-data android:value=&quot;${market_name}&quot; android: name=&quot;UMENG_CHANNEL&quot;" /> <fileset dir="" includes="AndroidManifest.xml" /> </replaceregexp> <antcall target="release" /> <move file="bin/${ant.project.name}-release.apk" tofile="chinese/${ant.project.name} -${market_name}-release.apk" /> </target>
  4. Batch compile <target name="chinese_apk_group1"> <antcall target="replace_market_and_build"> <param name="market_name" value="hiapk"/> </antcall>

    <antcall target="replace_market_and_build"> <param name="market_name" value="androidonline"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="guphone"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="anzow"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="gyous"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="fpwap"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="bestapk"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="androidcn"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="sjapk"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="anzhuoyuan"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="nduoa"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="ndoo"/> </antcall> <antcall target="replace_market_and_build"> <param name="market_name" value="appchina"/> </antcall> <replaceregexp flags="g" byline="false"> <regexp pattern="meta-data android:value=&quot;*&quot; android:name=&quot;UMENG_CHANNEL&quot;" /> <substitution expression="meta-data android:value=&quot;__MARKET__&quot; android:name=&quot; UMENG_CHANNEL&quot;" /> <fileset dir="" includes="AndroidManifest.xml" /> </replaceregexp> </target> $ ant chinese_apk_group1 Support "for" in contrib http://ant-contrib.sourceforge.net/tasks/tasks/for.html
  5. News • How many android device in office? • Got

    a tablet from Google • New API • New sample code
  6. Things I want to try • Fragment • Action bar

    • Use service to download data/API call • Multipane UI for tablet • Tabs + pager Sample Code • Google IO • ActionBarCompact • MobileTuts