Skip to content

Instantly share code, notes, and snippets.

@avivijay19
Last active November 13, 2022 12:19
Show Gist options
  • Save avivijay19/56a04b0288c353a6f91ef2fcecb4e139 to your computer and use it in GitHub Desktop.
Save avivijay19/56a04b0288c353a6f91ef2fcecb4e139 to your computer and use it in GitHub Desktop.
GSoC '22 Report | The Mifos Initiative | Refactor Android Client & Rewrite using Android SDK

gsoc_logo mifos_logo








GSoC 2022 @ The Mifos Initiative | Refactor Android Client & Rewrite using Android SDK

This gist contains the details about My GSoC '22 Project with The Mifos Initiative. During GSoC, I worked on refactoring, migrating the codebase to kotlin and rewriting android-client using the Mifos Android SDK.

In all the Android Applications of Mifos- android-client, mifos-mobile, mobile-wallet- there is a lot of repetitive code which deals with interacting with the Fineract APIs, which was optimized by moving it into a single library (fineract-android-sdk). This library needs to be added as a dependency to the android projects. This will save a lot of code and facilitate independent testing. In GSoC, I worked on implementing the same for one of the Mifos Applications (android-client). I integrated the fineract-android-sdk with android-client.

Introduction to the Fineract Client Library

The fineract client library has now been tested and published here. It may be used in projects written in Java, Android, or Kotlin. For more instructions on how to use the library, read README.md

Goals of the Project

  1. Update the Android client to latest dependencies
  2. Rewrite Android client to consume SDK instead of native code.
  3. Write appropriate unit and integration tests.
  4. Update CI/CD to reflect above changes
  5. Update corresponding documentation for building the app.

Impact

  1. Overall stability by increased testing coverage through a more stable and error-free codebase.
  2. Improved developer experience through faster build time.
  3. More seamless release management and upstream contribution
  4. Reduction of time to upgrade

Phase 1 - Refactor the Dependencies

During the community bonding period our plan was to upgrade the dependency of android-client and replacement of FindBugs tool with SpotBugs during the first half of the coding time frame.

The phase started with upgradation of dependencies to their respective latest versions and migration from com.android to androidx dependency. I also upgraded the android SDK and compiler android SDK to the latest version. The current versions of some important dependencies after upgradation are as follows:

Dependency Past Version Current Version
com.android.tools.build:gradle 3.3.2 7.2.1
com.github.Raizlabs.DBFlow.dbflow 3.3.2 7.2.1
com.amulyakhare:com.amulyakhare.textdrawable 0.3.0 1.0.0

During this time, upgradation of Gradle was one of the biggest challenges since the application was operating at gradle version 4.10.1 and now it has been migrated to version 7.5.0 of gradle.

After the upgrades, I started working with migration of Java code to Kotlin version 1.7.10.

Some UI enhancement was also introduced with respect to XML files, in which I refactored the old syntax according to the latest standards for developing user interface(UI) using XML.

Cleanup of issues and Pull Requests was also done during the timeframe of Phase-1, which included old PRs and Issues which were irrelevant with respect to the recently upgraded codebase.

Screenshot 2022-09-11 160239

Phase 2 - Rewriting The Android Application Using fineract-android-sdk

The phase majorly deals with the integration of fineract-android-sdk with android-client.

Some of the build failures occurred during the rewriting of the android-client with fineract-android-sdk which includes

  • Build
  • Lint Check
  • PMD
  • Checkstyle

Screenshot 2022-09-11 155841

Currently, the integration of SDK is under progress.

Important Pull Request

  • PR-1866 - Build fails due to a dependency on bintray
  • PR-1868 - restructured: xml files for regex row*.xml and util files
  • PR-1870 - restructured: xml files for regex item*.xml
  • PR-1872 - restructured: xml files for regex fragment*.xml
  • PR-1874 - restructured: xml files for regex activity*.xml and dialog*.xml
  • PR-1879 - DBFlow dependency refactor
  • PR-1881 - Upgrade project gradle version and dependency bumps
  • PR-1890 - Issue 1889
  • PR-55 - dependency upgrade (fineract-android-sdk)

Conclusion

Google Summer of Code with The Mifos Initiative was the most rewarding experience I've had as a student till date. It was incredibly amazing to have the chance to collaborate with talented developers from the community. I am grateful to Danish Jamal, Shashank Priyadarshi, Chinmay Kulkarni, and my mentors, for helping me with my project throughout the summer and extended timeline. Also, I would like to acknowledge Edward Cable and the entire community for their enthusiastic support in GSoC '22.

If you want to know more about the project, feel free to contact me here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment