How to have compile only dependency on an AAR lib
<p>I have an android SDK and I wanted to add new google auth feature to this SDK but keep the dependency compileOnly. This way the user of my SDK would not need to add the play services dependency if they don't want this feature.
I tried using 'provided' keyword in gradle to have compile-only dependency on the other google auth feature lib, but it does not work for 'aar' libs.</p>

<p>The 'provided' keyword only works for 'jar' files as mentioned <a href="https://developer.android.com/studio/build/build-variants.html#configure-dependencies" rel="nofollow noreferrer">here</a></p>