Skip to content

Commit

Permalink
add version number to generated annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Dec 3, 2023
1 parent 0d3429b commit cb25211
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.jbock.processor.JbockProcessor;

import javax.annotation.processing.Generated;
import java.util.Objects;

final class GeneratedAnnotation {

Expand All @@ -16,7 +17,8 @@ final class GeneratedAnnotation {
AnnotationSpec define() {
return AnnotationSpec.builder(Generated.class)
.addMember("value", CodeBlock.of("$S", JbockProcessor.class.getCanonicalName()))
.addMember("comments", CodeBlock.of("$S", "https://github.com/jbock-java/jbock"))
.addMember("comments", CodeBlock.of("$S", "https://github.com/jbock-java/jbock " +
Objects.toString(getClass().getPackage().getImplementationVersion(), "")))
.build();
}
}

0 comments on commit cb25211

Please sign in to comment.