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?


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.

Android Clean Architecture, by Five Agency

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 because app, data and device implement interfaces defined by domain
  • data depends on domain interfaces only
  • device depends on domain interfaces only
  • app depends on domain module
  • data and device are injected into app

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:

  1. Release device and domain as a Apache 2.0? project (My guts say yes)
  2. 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.


From what you've written, I'm not entirely clear about the problem. I'm going to assume that you're the sole rightsholder in {data,domain,app,device}.gradle (forgive the regexp) and that data.gradle, though written entirely by you, is linked to a third-party AGPLv3 library. Thus {domain,app,device}.gradle are unconstrained with respect to licence, but data.gradle must be distributed under AGPLv3. Given that the intent is for all four of your modules to be compiled into a single binary, you want to know what your options are.

The first important point is that licences do not inhere in code, they attach to recipients through the act of conveyance. The second important point is that the FSF has something to say about this issue:

The GPL says that the whole combined program has to be released under the GPL. So your module has to be available for use under the GPL.

But you can give additional permission for the use of your code. You can, if you wish, release your module under a license which is more lax than the GPL but compatible with the GPL.

So when you release the combined binary, and complete corresponding source, this must indeed be under AGPLv3 (per ss 4-6), but that does not prevent you from also releasing {domain,app,device}.gradle separately under more-permissive but compatible licences (which would include Apache2).

Have I understood the question correctly, and does this answer it?

  • 1
    Likely, it would also be allowed to license the source code of data.gradle under a permissive license: it is only the binaries that contain an AGPL component. – amon Jan 15 at 8:01
  • 1
    @amon I think you are likely right, but since I'm not yet sure that I understood the question, I thought I'd keep it brief until clarification followed. – MadHatter Jan 15 at 8:33
  • Great @MadHatter!! You have understood perfectly!!! The Android app already is published as GPL v3.0 and the server AGPL v3.0. – JP Ventura Jan 15 at 8:40
  • 1
    @JPVentura oh good! Does it answer your question? – MadHatter Jan 15 at 8:40
  • 1
    @JPVentura then feel free to accept the answer <grin>. "I am just wondering how much of the final project would have to be under the same license" it depends how you're distributing it. When it's conveyed compiled into an application, or in the complete corresponding source of that application, all of it must be conveyed under AGPLv3. When your work is conveyed as standalone pieces of code, any AGPLv3-compatible licence will do. – MadHatter Jan 15 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.