Skip to content

Reproducible Build fails for 2.0.12 #8

Description

@IzzySoft
  -rw-r--r--  0.0 unx      120 b-      118 defN 1981-01-01 01:01:02 33275c50 META-INF/version-control-info.textproto
- -rw-r--r--  0.0 unx     5149 b-     5149 stor 1981-01-01 01:01:02 886d823c assets/dexopt/baseline.prof
+ -rw-r--r--  0.0 unx     5149 b-     5149 stor 1981-01-01 01:01:02 efda4568 assets/dexopt/baseline.prof
  -rw-r--r--  0.0 unx      613 b-      613 stor 1981-01-01 01:01:02 0e46c9c0 assets/dexopt/baseline.profm
- -rw-r--r--  0.0 unx  3958144 b-  1770419 defN 1981-01-01 01:01:02 c6ae08d5 classes.dex
+ -rw-r--r--  0.0 unx  3958144 b-  1770417 defN 1981-01-01 01:01:02 2d3e3ccb classes.dex
  -rw-r--r--  0.0 unx    10096 b-    10096 stor 1981-01-01 01:01:02 9734baa0 lib/arm64-v8a/libandroidx.graphics.path.so

And classes.dex diff looks like… a dirty build? May I recommend you to always make sure there are no local, uncommitted changes in the build tree – nor any artifacts left from prior builds?

cd $project_dir
if [[ $(git status --porcelain | wc -l) -ne 0 ]]; then
  >&2 echo "ERROR! Tree is dirty, aborting build."
  exit 1
fi

./gradlew clean assembleRelease

Make sure to replace $project_dir with the directory your code resides (and the APK is built in) – and to adjust the build command (e.g. if you use build flavors). Short explanation:

  • the first block will abort the script if there are uncommitted changes. The "ERROR" message will be sent to STDERR (>&2).
  • the clean in the gradlew call will make sure no old artifacts are used for the build.

Name the script e.g. mkrelease, make it executable, and put it in your $PATH. Then, whenever you want to make a release build, call this script 😉

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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