TL; DR
We are considering creating a series of dependency modules (UI, repository patterns, etc) as separated Android libraries.
Could we use a permissive license (Apache 2.0, BSD-2 or MIT) despite statically linking them into another AGPL v3.0 app project?
Details
Android Clean Architecture
One of the many reasons for adopting architecture on Android apps is simplify testability isolating the business cases code from modules that require Android dependencies.
Business cases (or interactors) are implemented like command pattern instances.
With no Android framework dependencies at the domain
module, the network/cache and sensors boilerplate moved into data
and device
modules respectively.
In the current model:
- All modules depended on
domain
becauseapp
,data
anddevice
implement interfaces defined bydomain
data
depends ondomain
interfaces onlydevice
depends ondomain
interfaces onlyapp
depends ondomain
moduledata
anddevice
are injected intoapp
Permissive vs Strongly Protected Licenses
Unlike *.deb
or *.rpm
packages in a common Linux distribution, Android apps required static linking to its dependencies. Unless you are using a permissive dependency, the viral nature of (L)GPL forces the developer publish the whole app content, i.e. "thou shalt not use AGPL, GPL or LGPL dependencies."
The Mexican standoff
Given only data
uses a AGPLv3.0 library, could we:
- Release
device
anddomain
as a Apache 2.0? project (My guts say yes) - Release
app
as another Apache 2.0? project (My guts say no)
The intention is allow other developers use our code (like Airbnb Epoxy and MvRx) at their projects, but keep only the core technology under AGPL v3.0.