0

This is very similar to Gradle for Android AAR Depending Upon AAR, Both In The Same Remote Repository?, but this question is Maven-specific.

If I have an APK project (app) with a dependency on an AAR project (lib1), can lib1 have a dependency on another AAR project (lib2)?

Community
  • 1
  • 1
Heath Borders
  • 30,998
  • 16
  • 147
  • 256

2 Answers2

1

Yes.

Using Android Archetypes I created an android-with-test project, and then two android-library-quickstarts underneath it. I had to change the android-library-quickstart projects' packaging from apklib to aar. Then, I make lib1 depend upon lib2, and made my apk depend on lib1. mvn clean install succeeded.

Heath Borders
  • 30,998
  • 16
  • 147
  • 256
1

Yes as long as you use a recent version of the Android Maven Plugin that supports that..

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123