common/README.md
AnkiDroid Common is a pure JVM Gradle module containing utility functions, and definitions for core functionality used by other modules within AnkiDroid. Common should be the base of the AnkiDroid dependency tree.
Common has no Android dependencies. Code requiring Android APIs belongs in :common:android.
This module is expected to define interfaces which are initialized in the AnkiDroid module
com.ichi2.anki.commonDefinitions/interfaces exposing core functionality e.g. CrashReportService, UsageAnalytics
These are to be initialized higher up the dependency tree, typically in AnkiDroid
com.ichi2.anki.common.utilsUtility classes and methods
com.ichi2.anki.common.utils.extExtension methods, universally applicable to the classes they extend
As discussed in
#12582, AnkiDroid decided to split the
codebase into two modules, libAnki (business logic) and AnkiDroid (code interacting with
Android APIs). common existed for logic which both AnkiDroid and libAnki depended on.
Later, compat was split out, also depending on common, solidifying common
Backend - #647: libAnki is
intended to be converted to a java-library, so :common was split into :common:android,
ensuring that
Discussed on Discord: https://discord.gg/qjzcRTx