EventBus icon indicating copy to clipboard operation
EventBus copied to clipboard

How to generate the index in maven

Open liujingxing opened this issue 4 years ago • 1 comments

How do I pass the eventBusIndex parameter in Maven

liujingxing avatar Jul 16 '20 14:07 liujingxing

Maven is not officially supported (only Gradle is), but it should work similar to the following configuration. You should be able to replace with EventBus annotation processor and its option (https://greenrobot.org/eventbus/documentation/subscriber-index/):

<!-- Adds the ObjectBox annotation processor to enable code generation -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.0</version>
    <configuration>
        <annotationProcessorPaths>
            <path>
                <groupId>io.objectbox</groupId>
                <artifactId>objectbox-processor</artifactId>
                <version>${objectboxVersion}</version>
            </path>
        </annotationProcessorPaths>
        <annotationProcessors>
            <annotationProcessor>io.objectbox.processor.ObjectBoxProcessorShim</annotationProcessor>
        </annotationProcessors>
        <compilerArgs>
            <arg>-Aobjectbox.modelPath=${project.basedir}/objectbox-models/default.json</arg>
        </compilerArgs>
    </configuration>
</plugin>

greenrobot-team avatar Jul 27 '20 08:07 greenrobot-team