How do I share dependencies between Android modules

后端 未结 5 1088
长情又很酷
长情又很酷 2020-12-29 02:30

I have an Android application module (app) and an Android library module (library). Both app and library contain these same dependencies:

dependencies {
             


        
5条回答
  •  长发绾君心
    2020-12-29 03:01

    You can define shared gradle dependencies in the library module, and if the app module has the library as a dependency, you won't need to specify everything twice. Taking this further, you could create a 'common' module that requires the shared gradle dependencies, and have both the app & library module require the common module.

提交回复
热议问题