Skip to content

Generated EventBusIndex.class order should not change on every build #715

@GrazianoCapelli

Description

@GrazianoCapelli

Hi,
First of all thanks for making and publishing your great EventBus library.
Very simple to use and stable, I love it.

I opened this issue because I'm trying to compile our free and open source app BasicAirData GPS Logger in a deterministic way in order to have a reproducible build of the APK.
One of the first tests I made is to build the app 2 times and verify if the 2 builds are identical, and I found that they differ on the EventBusIndex.class, that have the rows in a different order.

Here below you can view an extract of the output of my diffoscope:

Schermata del 2023-05-10 23-20-54

I made the test using your latest EventBus v3.3.1 and the v3.2.0, and both have this issue.

I'm using the following Java version on Android Studio Electric Eel | 2022.1.1 for Linux:

openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
OpenJDK 64-Bit Server VM (build 11.0.15+0-b2043.56-8887301, mixed mode)
Gradle 7.1.2

I have two questions:

  1. Is the file EventBusIndex.class the Subscriber Index? If so: I generated the Subscriber Index once (like suggested on your web page) and then I commented that line (https://github.com/BasicAirData/GPSLogger/blob/966a9a8841cd7df4bb515a722eee54c94a7b48ae/app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java#LL1033C20-L1033C20). Why the build process creates a new Subscriber Index every time I compile the app?
  2. Is it possible to generate the EventBusIndex.class file in a deterministic way?

Thanks and regards.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions