Skip to content

Build question #6

@IzzySoft

Description

@IzzySoft

At IzzyOnDroid (where your app is listed since 3/2019 – be welcome to pick a badge to link there e.g. from your Readme) we support Reproducible Builds (see: Reproducible Builds, special client support and more at IzzyOnDroid). Trying for yours, I was able to successfully generate the APK using ./gradlew assembleRelease, but the resulting APKs were not identical. If almost looks as if I missed some build steps, but I could not find related instructions:

  -rw-r--r--  0.0 unx  4187284 b-  1521211 defN 1981-01-01 01:01:02 91106f9d classes.dex
- -rw-r--r--  0.0 unx      379 b-      232 defN 1981-01-01 01:01:02 84826e51 assets/any.css
- -rw-r--r--  0.0 unx      248 b-      248 stor 1981-01-01 01:01:02 67374c4e assets/images/back.png
- -rw-r--r--  0.0 unx      288 b-      288 stor 1981-01-01 01:01:02 077c106a assets/images/close.png
- -rw-r--r--  0.0 unx      280 b-      280 stor 1981-01-01 01:01:02 5e694fab assets/images/done.png
- -rw-r--r--  0.0 unx      301 b-      301 stor 1981-01-01 01:01:02 de764b8c assets/images/folders.png
- -rw-r--r--  0.0 unx      366 b-      366 stor 1981-01-01 01:01:02 78194494 assets/images/new.png
- -rw-r--r--  0.0 unx      281 b-      281 stor 1981-01-01 01:01:02 7cf51c57 assets/images/rm.png
- -rw-r--r--  0.0 unx      476 b-      476 stor 1981-01-01 01:01:02 44eeb029 assets/images/search.png
- -rw-r--r--  0.0 unx      217 b-      217 stor 1981-01-01 01:01:02 bebb049b assets/images/settings.png
- -rw-r--r--  0.0 unx     8845 b-     8845 stor 1981-01-01 01:01:02 10a5724b assets/images/sync.png
- -rw-r--r--  0.0 unx    47273 b-    10648 defN 1981-01-01 01:01:02 a4a36283 assets/index.html
- -rw-r--r--  0.0 unx     1910 b-      738 defN 1981-01-01 01:01:02 597e544f assets/ios.css
- -rw-r--r--  0.0 unx    23992 b-     8102 defN 1981-01-01 01:01:02 39d9ee43 assets/langs.js
- -rw-r--r--  0.0 unx     8519 b-     2187 defN 1981-01-01 01:01:02 111da398 assets/style.css
+ -rw-r--r--  0.0 unx      108 b-       98 defN 1981-01-01 01:01:02 89429104 assets/ReadMe.txt
  -rw----     2.4 fat        6 b-        6 stor 1981-01-01 01:01:02 5cd9fe4c META-INF/android.arch.core_runtime.version

So while your APK contains a bunch of files missing in my build from the tagged commit, mine has one file missing in yours. Confuses me a little. Is there some copy task missing on my end (the missing files seem to be in the Multi/ tree)? Checking with the Readme.txt I figured that would be the case – but copying all its contents, as the readme says, I end up with too many files in my APK. I have to copy very selectively:

build:
  - cd Source/Android
  - rm app/src/main/assets/ReadMe.txt
  - cp -a ../Multi/images ../Multi/*.css ../Multi/index.html ../Multi/langs.js app/src/main/assets/
  - rm app/src/main/assets/images/flashlight.png app/src/main/assets/images/qr.png app/src/main/assets/images/share.png app/src/main/assets/windows.css
  - chmod +x gradlew
  - ./gradlew assembleRelease

And even then, the index.html differs (so the APK was probably not built from the tagged commit). I had to go back to fa6712a (at which point the windows.css did not yet exist, so the rm failed and needed to be adjusted again) – then the build became reproducible.

I somehow doubt you'd do that copying manually; maybe you could include the copy script (or have a gradle task taking care for that automatically)? Ideally not just as a Windows batch file (you seem to build on Windows), but (also) as shell script or something OS agnostic 😉 And please, have the APK of future releases match the tagged commit. As your build seems not to provide vcsInfo, it otherwise means a lot of manual work to figure out which one it was…

We'd appreciate if you could help keeping your build reproducible. We've prepared some hints on reproducible builds for that.

Looking forward to your reply!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions