EventBus icon indicating copy to clipboard operation
EventBus copied to clipboard

How to generate index in multi module

Open zouzhenglu opened this issue 9 years ago • 5 comments

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

zouzhenglu avatar Dec 01 '17 07:12 zouzhenglu

You can try the instructions in the Subscriber Index documentation. -ut

greenrobot-team avatar Jan 23 '18 07:01 greenrobot-team

@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 avatar Mar 25 '18 04:03 X-FAN

@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

greenrobot-team avatar Mar 27 '18 11:03 greenrobot-team

can you give me an example to add eventbus into Kotlin ? i don't know what is MyEventBusIndex

hanhmh1203 avatar Apr 15 '20 09:04 hanhmh1203

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?

notsatyarth avatar Jun 29 '20 17:06 notsatyarth