matrei commented on code in PR #14675:
URL: https://github.com/apache/grails-core/pull/14675#discussion_r2062955996
##########
grails-core/src/main/groovy/org/grails/compiler/injection/GlobalGrailsClassInjectorTransformation.groovy:
##########
@@ -200,20 +207,44 @@ class GlobalGrailsClassInjectorTransformation implements
ASTTransformation, Comp
addToProps(props, superTypeName, classNodeName)
- factoriesFile.withWriter { Writer writer ->
+ factoriesFile.withWriter { Writer writer ->
props.store(writer, "Grails Factories File")
}
+
+ makeFactoriesFileReproducible(factoriesFile)
+
return true
}
return false
}
+ private static void makeFactoriesFileReproducible(File factoriesFile) {
+ String sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH")
+ if (!sourceDateEpoch) {
+ return
+ }
+
+ Instant buildInstant = Optional.ofNullable(
Review Comment:
Can `sourceDateEpoch` be `null` here?
##########
grails-core/src/main/groovy/org/grails/compiler/injection/GlobalGrailsClassInjectorTransformation.groovy:
##########
@@ -200,20 +207,44 @@ class GlobalGrailsClassInjectorTransformation implements
ASTTransformation, Comp
addToProps(props, superTypeName, classNodeName)
- factoriesFile.withWriter { Writer writer ->
+ factoriesFile.withWriter { Writer writer ->
props.store(writer, "Grails Factories File")
}
+
+ makeFactoriesFileReproducible(factoriesFile)
+
return true
}
return false
}
+ private static void makeFactoriesFileReproducible(File factoriesFile) {
+ String sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH")
Review Comment:
String?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]