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

Android Build Automation

daijo
February 21, 2012

Android Build Automation

Presentation on Android Build Automation (a bit dated).

daijo

February 21, 2012
Tweet

More Decks by daijo

Other Decks in Programming

Transcript

  1. What we need To be able to successfully implement TDD/BDD

    we need a fully automated build and testing process We want to use already available, low maintenance and cross platform tools Friday, February 19, 2010
  2. Create a project In Eclipse using ADT Alt. using the

    android tool directly Friday, February 19, 2010
  3. Create ANT-files Require AndroidManifest.xml android update project -s -p /Project

    ... android update test-project -m /Project -p Project/ TestProject Friday, February 19, 2010
  4. Project folders and files ./src ./lib ./res ./TestProject AndroidManifest.xml build.xml

    default.properties local.properties (not under source control) Friday, February 19, 2010
  5. /TestProject folders and files ./src ./lib ./res AndroidManifest.xml build.xml default.properties

    build.properties (-> Project; CI if relative path) local.properties (not under source control) Friday, February 19, 2010
  6. Subversion Add projects to repository Developers CI/CO in Eclipse using

    Subclipse plugin CO on Continous Integration Server via Ant (using svnant, <svn>...</svn>) Friday, February 19, 2010
  7. CruiseControl Install Download n’ Unzip -> /opt/cruisecontrol-bin-2.8.3 Create /etc/init.d/cruisecontrol (CC_WORK_DIR=/

    builds -> builds/config.xml) sudo /etc/init.d/cruisecontrol start http://localhost:8484/ Friday, February 19, 2010
  8. /builds folders and files ./checkout (Checked out projects end up

    here) .injects/local.properties (-> CIS’ SDK) .injects/Project/TestProject/build.properties (-> Project) (you may skip and just use a relative path to Project and checkin) ./logs (Logs end up here) ./artifacts (You can make CC store build artifacts in a ordered way) ./svnant-1.3.0 (Used to checkout from SVN repo in ANT) cc-build-Project.xml (delegating ANT build file) config.xml (CruiseControl config file) Friday, February 19, 2010
  9. cc-build-Project.xml ANT-file initiated by CruiseControl from config.xml Clean away old

    builds and CO the project local.properties for the build server is copied to both Project and TestProject after checkout Initiates checked out build.xml to build and test the project Friday, February 19, 2010
  10. config.xml Tells CruiseControl what to do for every included <project>

    ... </project> Checks SVN-repository for modifications and initiate builds and tests using appropriate cc- build-Project.xml Save build status, logs and artifacts Publish notifications on failed and fixed Friday, February 19, 2010
  11. Reference Pragmatic Project Automation - Mike Clark http://developer.android.com/guide/developing/ other-ide.html Configuring

    CruiseControl for Linux - http:// www.testearly.com Getting Started With CruiseControl Friday, February 19, 2010