0

In Android Studio, I've created an Android Library Module. Said module has its own Gradle file, and I intend to make it as independent from the app that will be using it as possible - that means that the user doesn't have to copy the Library Module's Gradle dependencies into the app module's Gradle dependencies block.

How do I go about doing it? Do I have to search for the .jar files of said dependencies and add them to the Library Module instead of the ordinary compile '<libpackage>:<libname>:<libversion>' lines in Gradle?

Gensoukyou1337
  • 1,507
  • 1
  • 13
  • 31

1 Answers1

0

You can export this library into aar file and compile this file as library, it will download all inside library dependencies

Export library to AAR here: Create aar file in Android Studio

Khang Tran
  • 467
  • 5
  • 16
  • I've done this, and like I said, I still had to copy the dependencies block in its Gradle file into the main app's Gradle file. I need a method that eliminates the need to do that. – Gensoukyou1337 Jul 11 '17 at 08:12
  • Could you try with setting "transitive = true" in the AAR library dependencies. More detail here: https://stackoverflow.com/questions/31731014/what-does-transitive-true-in-gradle-exactly-do-w-r-t-crashlytics?answertab=votes#tab-top – Khang Tran Jul 19 '17 at 16:50