title: How to merge / combine two aar files?
body: <p>My use case is the following:</p>
  
  <ol>
  <li>I have an aar library (lets say L1) provided to me by a third party. Please note that I don't have the source for this.</li>
  <li>I want to write a wrapper layer on top of L1 and create another aar (SDK) (lets say L2). L1 should be packaged inside L2. Please note that the code in L2 is minimal, it is just like a wrapper for L1.</li>
  <li>The idea is that if someone integrates this SDK into their Android application, the application should only be interacting with L2, it should not even need to know that L1 exists. Basically, I want that in the application gradle file, only L2 should be included.</li>
  </ol>
  
  <p>My question is whether this is possible?
  I looked at some similar questions on stack overflow - I got the following possible solutions - but none of them seemed suitable:</p>
  
  <ol>
  <li>Use android-fat-aar plugin - From what I understand, this plugin does not work with the latest gradle versions and is no longer actively maintained. I am using Android Studio Version 3.3.1 and gradle version 4.10.1. I think it also has some other limitations of not working well in case of aidl files.</li>
  <li>Some answers seemed to indicate to publish the aar to some repository like maven, in which case this would get resolved. I am not exactly sure if I understood that correctly, but in any case, publishing either L1 or L2 to any public repository is not an option for me.</li>
  </ol>
  
  <p>So again to reiterate basic requirements are:</p>
  
  <ol>
  <li>The application should only call APIs of and interact with L2.</li>
  <li>The application should only need to include depencency of L2 in its gradle file?</li>
  </ol>
  
  <p>Is there any way to achieve it given the constraints I mentioned - it doesn't necessarily have to be via merging aars.</p>
  
  <p>Is the following possible / does it make any sense:</p>
  
  <ol>
  <li>Write the code needed for L2 and create a jar out of it</li>
  <li>Extract L1 aar (since aar is basically an archive)</li>
  <li>Add the jar created in step 1 above and create a new aar (lets say L3) which includes L2 APIs.</li>
  <li>The application now needs to add as dependency and interact with only one dependency L3 (which will have L2 APIs).</li>
  </ol>