SHA256
1
0
forked from pool/groovy18
Fridrich Strba 2023-09-14 18:55:03 +00:00 committed by Git OBS Bridge
parent 35e9fae218
commit a869a78e17

View File

@ -18,7 +18,7 @@
public class CompiledAtASTTransformation implements ASTTransformation { public class CompiledAtASTTransformation implements ASTTransformation {
- private final static compileTime = new Date().toString() - private final static compileTime = new Date().toString()
+ private final static compileTime = System.getenv("SOURCE_DATE_EPOCH") != null ? new new Date(1000 * Long.parseLong(sourceDateEpoch)).toString() : new Date().toString() + private final static compileTime = System.getenv("SOURCE_DATE_EPOCH") != null ? new new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).toString() : new Date().toString()
public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) {
@ -29,10 +29,10 @@
<html> <html>
<head> <head>
-<!-- Generated by groovydoc (${GroovySystem.version}) on ${new Date()} --> -<!-- Generated by groovydoc (${GroovySystem.version}) on ${new Date()} -->
+<!-- Generated by groovydoc (${GroovySystem.version}) on ${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)) : new Date()} --> +<!-- Generated by groovydoc (${GroovySystem.version}) on ${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()} -->
<title>${title}</title> <title>${title}</title>
-<meta name="date" content="${new Date().format('yyyy-MM-dd')}"> -<meta name="date" content="${new Date().format('yyyy-MM-dd')}">
+<meta name="date" content="${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)).format('yyyy-MM-dd') : new Date().format('yyyy-MM-dd')}"> +<meta name="date" content="${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).format('yyyy-MM-dd') : new Date().format('yyyy-MM-dd')}">
<meta http-equiv="Content-Type" content="text/html; charset=${props.charset}"> <meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
<link href="${classDoc.relativeRootPath}groovy.ico" type="image/x-icon" rel="shortcut icon"> <link href="${classDoc.relativeRootPath}groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="${classDoc.relativeRootPath}groovy.ico" type="image/x-icon" rel="icon"> <link href="${classDoc.relativeRootPath}groovy.ico" type="image/x-icon" rel="icon">
@ -43,10 +43,10 @@
<html><head> <html><head>
<meta http-equiv="Content-Type" content="text/html; charset=${props.charset}"> <meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
-<!-- Generated by groovydoc (${GroovySystem.version}) on <% new Date() %> --> -<!-- Generated by groovydoc (${GroovySystem.version}) on <% new Date() %> -->
+<!-- Generated by groovydoc (${GroovySystem.version}) on <% System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)) : new Date() %> --> +<!-- Generated by groovydoc (${GroovySystem.version}) on <% System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date() %> -->
<title>${title}</title> <title>${title}</title>
-<meta name="date" content="${new Date().format('yyyy-MM-dd')}"> -<meta name="date" content="${new Date().format('yyyy-MM-dd')}">
+<meta name="date" content="${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)).format('yyyy-MM-dd') : new Date().format('yyyy-MM-dd')}"> +<meta name="date" content="${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).format('yyyy-MM-dd') : new Date().format('yyyy-MM-dd')}">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon"> <link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon"> <link href="groovy.ico" type="image/x-icon" rel="icon">
@ -57,7 +57,7 @@
<html><head> <html><head>
<meta http-equiv="Content-Type" content="text/html; charset=${props.charset}"> <meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
-<!-- Generated by groovydoc (${GroovySystem.version}) on <% new Date() %> --> -<!-- Generated by groovydoc (${GroovySystem.version}) on <% new Date() %> -->
+<!-- Generated by groovydoc (${GroovySystem.version}) on <% System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)) : new Date() %> --> +<!-- Generated by groovydoc (${GroovySystem.version}) on <% System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date() %> -->
<title>${title}</title> <title>${title}</title>
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon"> <link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon"> <link href="groovy.ico" type="image/x-icon" rel="icon">
@ -68,10 +68,10 @@
<html><head> <html><head>
<meta http-equiv="Content-Type" content="text/html; charset=${props.charset}"> <meta http-equiv="Content-Type" content="text/html; charset=${props.charset}">
-<!-- Generated by groovydoc (${GroovySystem.version}) on <% new Date() %> --> -<!-- Generated by groovydoc (${GroovySystem.version}) on <% new Date() %> -->
+<!-- Generated by groovydoc (${GroovySystem.version}) on <% System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)) : new Date() %> --> +<!-- Generated by groovydoc (${GroovySystem.version}) on <% System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date() %> -->
<title>${title}</title> <title>${title}</title>
-<meta name="date" content="${new Date().format('yyyy-MM-dd')}"> -<meta name="date" content="${new Date().format('yyyy-MM-dd')}">
+<meta name="date" content="${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(sourceDateEpoch)).format('yyyy-MM-dd') : new Date().format('yyyy-MM-dd')}"> +<meta name="date" content="${System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))).format('yyyy-MM-dd') : new Date().format('yyyy-MM-dd')}">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon"> <link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon"> <link href="groovy.ico" type="image/x-icon" rel="icon">