raamcosta / compose-destinations

Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
https://composedestinations.rafaelcosta.xyz
Apache License 2.0
3.2k stars 132 forks source link

"Reproducible build" possible with Compose Destinations? #645

Closed janexner closed 4 months ago

janexner commented 4 months ago

Is it possible to make a "reproducible build" with Compose Destinations?

raamcosta commented 4 months ago

Hi @janexner 👋

What exactly do you mean? 🤔

janexner commented 4 months ago

Sorry, that was a little cryptic indeed. When you publish an app on F-Droid, they ask whether it's a "reproducible build", meaning would it be possible to create the exact same APK from the sources no matter where (e.g. my Android Studio versus the build pipeline that F-Droid uses on gitlab). A link they published: https://f-droid.org/docs/Reproducible_Builds

Then there is a toold call diffoscope (https://diffoscope.org/) that you can (and F-Droid's pipeline does) use to compare APKs, and when I use diffoscope on my app, I get messages to do with Compose Destinations, such as these:

image

I am now wondering whether Compose Destinations use any features that may lead to randomly assigned identifiers or anything like that, that would break reproducible builds.

Disclaimer: I am totally new to F-Droid and reproducible builds. I know that if yours is, people can install from any source, and upgrade from any other, which I think is cool. It's obv possible that what I see has nothing to do with how Compose Destinations works, but that it is something in the/my toolchain. Hence my question.

janexner commented 4 months ago

Also want to add that your library has saved me, literally. W/o Compose Destinations, I would never have been able to build what I built. Big thanks for that!

janexner commented 4 months ago

I think I managed to create a reproducible build, so I shall close this.

janexner commented 4 months ago

The answer is "Yes!"