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?