How do I share dependencies that use annotationProcessor between Android modules?

霸气de小男生 提交于 2019-12-10 17:33:51

问题


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

dependencies {
   implementation 'com.jakewharton:butterknife:8.8.1'
   annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}

However in my project the module (A) is depending on module (B) so I did search on the stack overflow about how could I implement Don't Repeat Yourself design pattern so that I will include those dependencies only in the module (B) and I found this useful but I didn't find how could I make this dependency

annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1

shared between those two modules so how could I do that?

来源:https://stackoverflow.com/questions/51694352/how-do-i-share-dependencies-that-use-annotationprocessor-between-android-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!