File: 0051-reproducible-build-source-date.patch

package info (click to toggle)
libspring-java 4.3.30-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 65,728 kB
  • sloc: java: 566,974; xml: 13,706; sql: 2,313; sh: 87; ruby: 75; jsp: 33; makefile: 29; javascript: 11; python: 4
file content (15 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: use a reproducible copyright date in the JAR metadata
Author: tony mancill <tmancill@debian.org>
Forwarded: not-needed

--- a/build.gradle
+++ b/build.gradle
@@ -230,7 +230,7 @@
 			include "license.txt"
 			include "notice.txt"
 			into "META-INF"
-			expand(copyright: new Date().format("yyyy"), version: project.version)
+			expand(copyright: new Date(Long.valueOf(System.getenv("SOURCE_DATE_EPOCH")) * 1000).format("yyyy"), version: project.version)
 		}
 	}