How to generate index in multi module
As the subject. I know how to add index when I init the eventBus, but How Can I generate the index when I want to use the eventbus in multi module
You can try the instructions in the Subscriber Index documentation. -ut
@greenrobot-team I add
javaCompileOptions {
annotationProcessorOptions {
arguments = [eventBusIndex: 'com.example.myapp.MyEventBusLibIndex']
}
}
in my library module build.gradle, but not generate MyEventBusLibIndex class. Can you tell me why?
@X-FAN Did you also add the library and annotation processor to your dependencies?
dependencies {
implementation 'org.greenrobot:eventbus:3.1.1'
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.1.1'
}
-ut
can you give me an example to add eventbus into Kotlin ? i don't know what is MyEventBusIndex
The approach requires configuring the package name for each module to have all of those installed at app level. Would it be possible to have a default location (in each module's package hierarchy) for the index file to be generated?