-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Would it be possible to add an option so that the generated code includes a @Generated
annotation, but without a timestamp?
This would help exclude generated sources from analysis tools while keeping reproducible builds intact (timestamps usually break reproducibility).
Example Hibernate disable generated annotation because they have reproducible build.
Lines 145 to 154 in 1a79efb
JClassDef generateModel() throws IllegalStateException { | |
// Add generated annotation if required | |
final TypeElement generatedAnnotation = messageInterface.generatedAnnotation(); | |
if (generatedAnnotation != null) { | |
final JType generatedType = typeOf(generatedAnnotation.asType()); | |
sourceFile._import(generatedType); | |
classDef.annotate(generatedType) | |
.value("value", getClass().getName()) | |
.value("date", JExprs.str(ClassModelHelper.generatedDateValue())); | |
} |
Metadata
Metadata
Assignees
Labels
No labels