Allow for reproducible builds

REPRODUCIBLE_BUILD=1 ./gradlew clean :build
This commit is contained in:
Jonas Herzig
2017-08-08 20:30:42 +02:00
parent 41d2547f3c
commit ebbe363954
34 changed files with 1553 additions and 13 deletions

16
gradlew vendored
View File

@@ -6,6 +6,12 @@
##
##############################################################################
if [ "$REPRODUCIBLE_BUILD" == "1" ] && [ -f ./gradle/reprod/setup.sh ] && [ "$1" != "-Preprod" ]; then
./gradle/reprod/setup.sh || exit
./gradlew -Preprod "$@"
exit
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
@@ -42,11 +48,6 @@ case "`uname`" in
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@@ -61,9 +62,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -114,6 +115,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`