如何在Android模块之间共享使用annotationProcessor的依赖项?

如何在Android模块之间共享使用annotationProcessor的依赖项?,android,android-gradle-plugin,annotation-processor,android-module,Android,Android Gradle Plugin,Annotation Processor,Android Module,我有一个Android应用程序模块(A)和一个Android库模块(B)。(A)和(B)都包含这些相同的依赖项: dependencies { implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' } 然而,在我的项目中,模块(A)取决于模块(B) 因此,我在堆栈溢出上搜索了如何实现不要重复自己设计模式,以

我有一个Android应用程序模块(A)和一个Android库模块(B)。(A)和(B)都包含这些相同的依赖项:

dependencies {
   implementation 'com.jakewharton:butterknife:8.8.1'
   annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
然而,在我的项目中,模块(A)取决于模块(B) 因此,我在堆栈溢出上搜索了如何实现
不要重复自己
设计模式,以便只在模块(B)中包含这些依赖项,我发现这些依赖项很有用,但我没有找到如何实现此依赖项

annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1
在这两个模块之间共享
那么我该怎么做呢?

这是一个注释,而不是依赖关系,所以我不相信它可以在模块之间共享,不幸的是,经过长时间的搜索,我发现它应该添加到每个模块中