Skip to content

Code Structure and Pulling Changes From ODK Collect

Jason Rogena edited this page Dec 7, 2016 · 3 revisions

The Ona Collect fork is structured in a way that is easy to pull code changes from the ODK Collect repository. The master branch in this repository has an identical history to the master branch in the ODK Collect repository. Ona Collect's main branch (contains both Ona Collect, and ODK Collect features) is ona_collect

Classes have been grouped into two packages; org.odk.collect.android, and io.ona.collect.android. These two packages have the same sub-package structure.

We have tried as much as possible to leave all classes that were originally in the ODK Collect repository in org.odk.collect.android. We had, however, to move the following classes:

  • All classes originally in org.odk.collect.android.provider have been moved to io.ona.collect.android.provider

All newly added classes, and classes that we consider too diverged from what is in upstream are put in the io.ona.collect.android package.

Pulling Changes From ODK Collect

When rebasing Ona Collect's git history on-top of ODK Collect's, take note of the following:

  1. Any newly added classes in org.odk.collect.android.provider should be moved to io.ona.collect.android.provider
  2. Any changes in org.odk.collect.android.activities.SplashScreenActivity should be reviewed and potentially copied over to io.ona.collect.android.activities.LoginActivity. The SplashScreenActivity is deprecated in Ona Collect, and replaced with LoginActivity
  3. Replace all instances of import org.odk.collect.android.R with import io.ona.collect.android.R
Clone this wiki locally