简体   繁体   中英

What is the api equivalent for kapt/annotationProcessor?

When we have multiple modules in an Android project, for example, we have a mylibrary module, and some other module apps that will include this mylibrary module in the dependency by implementation project(':mylibrary')

Then when we want to add library which will be used for all the modules, we will add the library dependency in the mylibrary's gradle dependency using the api instead of implementation . For example:

api 'com.google.code.gson:gson:2.8.5'

Sometimes a library need an annotationProcessor to be included in the dependency.

kapt "org.example:example:1.0.1"

If I want to include this annotation processor in mylibrary's dependency and make it available to multiple modules, what do I use instead of kapt ?

annotationProcessorkapt依赖项不是可传递的,因此需要为项目中的每个模块声明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM