#1037235 gradle-kotlin-dsl: reproducible-builds: generated classpath files differ when /bin/sh -> bash

#1037235#5
Date:
2023-06-08 22:50:43 UTC
From:
To:
When /bin/sh points to bash vs. dash, two classpath files get generated
different with different content.

https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/gradle-kotlin-dsl.html

  runtime=annotations-13.0.jar,gradle-kotlin-dsl-tooling-models.jar ...
  vs.
  projects=\nruntime=annotations-13.0.jar,gradle-kotlin-dsl-tooling-models.jar ...

The attached patch fixes this in debian/rules by using printf instead of
echo, as echo implementations vary in the handling of "\n" in different
shells.

According to my local tests, applying this patch should make
gradle-jotlin-dsl build reproducibly on tests.reproducible-builds.org!

Thanks for maintaining gradle-kotlin-dsl!

live well,
  vagrant