Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is for documenting the Client Refactor and Cleanup work.

Child Page


OpenSRP Client code (path branch)  has been refactored to several modules and applications.

...

A Library should emit/generate an Android archive (.aar) file that will  be pushed to maven. An Application will then download the maven file and add it as a compile dependency. For more info, checkout How to upload and use module libraries on mavenAndroid client libraries to Maven/Sonatype

Modules

Core module

https://github.com/OpenSRP/opensrp-client-core

...

Code Block
languagejava
themeDJango
public class YourApplication extends DrishtiApplication {
    ...

    @Override
    public void onCreate() {
        super.onCreate();

		...

   		//Initialize Modules
        CoreLibrary.init(context());
        GrowthMonitoringLibrary.init(context(), getRepository());
        ImmunizationLibrary.init(context(), getRepository(), createCommonFtsObject());
    }
...
}

Code CleanUp

Codacy tool has been linked with github and will review code changes after a pull request has been created or updated.

Only the file changed will be reviewed. Codacy reviews the code changes in these files.

Developers are encouraged to open DNM pull requests to trigger reviews rather than wait until the actual PRs are created.

DNM stands for Do Not Merge, for example, “DNM: Fix some issue”

Protected Branch

The master branch in the modules and application has been set up as a protected branch.

This means that pull requests to the master branch should be reviewed.

Status check (travis and codacy) should pass.

Development Hacks

1. Do not include launcher intent filter in your library

...