Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Development Tutorial

Georg Semmler edited this page Mar 23, 2016 · 8 revisions

You want to help us developing Mirakel? Great! We changed our development process a bit to improve our code quality and to support the old android versions furthermore.

Clone our repo

We use gerrit to review patches.

  1. Install the android sdk

  2. Create an account on our gerrit instance, add your public key

  3. Add the following lines to your ~/.ssh/config:

Host gerrit.azapps.de
	IdentityFile ~/.ssh/[YOUR KEY-FILE]
  User [YOUR GERRIT-USERNAME]
  1. Clone the source code and add the commit hook for gerrit.
$ git clone https://[email protected]/r/MirakelX/mirakel-android && scp -p -P 29418 [email protected]:hooks/commit-msg mirakel-android/.git/hooks/
  1. Add some configurations:
  • copy mirakel-android/local.properties.dist to mirakel-android/local.properties and change the path to the sdk directory in this configuration file
  • copy mirakel-android/new_ui/local.properties.dist to mirakel-android/new_ui/local.properties
  • copy your debug keystoreto mirakel-android/new_ui/debug.keystore and mirakel-android/dashclock/debug.keystore

That's it. You should now have a fully working Mirakel-environment and you can start developing!

Using Android Studio

Get the Android SDK and Android Studio from here

FileImport Project

Start developing ;)

Using Eclipse

Do not use Eclipse. We do not support Eclipse anymore

Using Gradle

The simplest way to build Mirakel using Gradle is:

$ ./gradlew build

Of course there are some more tasks you can do:

$ ./gradlew tasks

Now you should see all the possible tasks. Just select one and build it with gradle [taskname]

Happy hacking!

Developing

Code structure

This part could be not up to date. Last change: 2015-06-14

We have structured our code in the following projects:

Helper libraries

This stuff you mostly do not need to touch. It is working fine.

  • /changelog/ Show the changelog on startup after an update.
  • /colorpicker/
  • /colorpickerpreference/ The colorpicker for using in the preferences.
  • /date-time-picker/ A modified picker for pick a date and a time simultaneously
  • /donationslib/ Donation library supporting Paypal, Flattr and Google Play
  • /ilovefs-android/ An information dialog displayed on the I love FS day

New_ui

The main part of Mirakel containing the new UI.

Model

Here you can find our models. They are responsible for communicating with the database and represents our data structures.

tw_sync

Everything which has something to do with the taskwarrior sync.

Settings

Everything which has something to do with the settings part of mirakel.

Widget

Everything for the widget. Because Android < 3 has bad support for widgets there are some hacks needed.

Helper

Here is everything which we may need in other places. It would be nice to restructure this library.

Third party stuff:

  • au.com.bytecode.opencsv The OpenCSV library for parsing CSV Files

  • org.dmfs.provider.tasks The tasks provider used for the CalDAV sync

  • de.azapps.tools

    • FileUtils Stuff for working with files
    • Log A wrapper for the Android Log class. Supports writing Logs to files. Use this class when you want to log something.
  • de.azapps.mirakel.helper

    • error Classes for improved error handling
    • *.java specialized helper classes for different purposes

Tools

Tools we use for developing:

Suggestions for more/better tools are welcome!