Skip to content

Creating your own Baker Android Project

Francisco Contreras edited this page Mar 13, 2014 · 30 revisions

To create your own baker application for an Android environment you have compile the library and then create your own project in Android Studio. The following will guide you through the process:

Prerequisites

  • Android Studio installed Home Page
  • Maven Build Tool Home Page

Compiling Baker Frameworks

  1. Download Baker Frameworks to your local environment (download here).
  2. From Console/Terminal (for Unix Systems) or CMD for Windows go to the "ABakerProject" folder. (if you list the files you should be able to see "gradlew").
  3. Run "gradlew install" command, if you are running on Windows it should go like this "gradlew.bat install" otherwise use "./gradlew install".

If this last step ran correctly you should see something like this BUILD SUCCESSFUL Total time: 21.441 secs

It means that Baker Frameworks for Android was installed as a library in your Maven repository wich will allow you to use it in you own project.

Creating your own Baker Android project

  1. Open Android Studio and click "New Project...".
  2. Add your applications details and click "Next".
  3. Use "Blank Activity" and click "Next".
  4. You can use the default values for Activities, click "Finish".
  5. On the project view, extend your module node and open the "build.gradle" file. Noticie is not the project but the node build file.
  6. Add your local maven repository url to below the apply statement, should look like this: apply plugin: 'android' repositories { maven { url 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath } }
  7. Add the Android Baker Library to the compile dependencies compile 'com.giniem:ABaker:1.0'
  8. From the Android Baker Library "src" folder copy the "AndroidManifest.xml" file and replace the one on your project module.
  9. Replace the package name on the manifest definition with the package name of your project.
  10. Sync your gradle files.
Clone this wiki locally