File tree Expand file tree Collapse file tree 4 files changed +18
-12
lines changed
tooling/metamodel-generator
src/main/java/org/hibernate/processor Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ buildscript {
1919plugins {
2020 id " local.module"
2121
22- id " org.hibernate.build.version-injection" version " 2.0 .0" apply false
22+ id " org.hibernate.build.version-injection" version " 2.1 .0" apply false
2323 id ' org.hibernate.orm.database-service' apply false
2424 id ' biz.aQute.bnd' version ' 7.1.0' apply false
2525
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ plugins {
88 id " local.publishing-java-module"
99 id " local.publishing-group-relocation"
1010
11+ id " org.hibernate.build.version-injection"
1112 id " org.hibernate.orm.antlr"
1213 id " local-xjc-plugin"
1314}
@@ -132,6 +133,10 @@ xjc {
132133 }
133134}
134135
136+ versionInjection {
137+ into( ' org.hibernate.Version' , ' initVersion' )
138+ }
139+
135140task copyBundleResourcesXml (type : Copy ) {
136141 inputs. property( " db" , db )
137142 inputs. property( " dbHost" , dbHost )
Original file line number Diff line number Diff line change 66plugins {
77 id " local.publishing-java-module"
88 id " local.publishing-group-relocation"
9- id " org.hibernate.build.version-injection"
9+ id " org.hibernate.build.version-injection"
1010}
1111
1212description = ' Hibernate compile-time tooling'
@@ -77,6 +77,10 @@ configurations {
7777 jakartaDataCompileOnly. extendsFrom(testCompileOnly)
7878}
7979
80+ versionInjection {
81+ into( ' org.hibernate.processor.Version' , ' initVersion' )
82+ }
83+
8084def quarkusOrmPanacheTestTask = tasks. register( ' quarkusOrmPanacheTest' , Test ) {
8185 description = ' Runs the Quarkus ORM Panache tests.'
8286 group = ' verification'
Original file line number Diff line number Diff line change 66
77import org .hibernate .processor .util .NullnessUtil ;
88
9- import org .checkerframework .checker .nullness .qual .Nullable ;
10-
119/**
1210 * Information about the Meta Model Generator version.
1311 *
1412 * @author Hardy Ferentschik
1513 */
1614public final class Version {
17- private static @ Nullable String version ;
15+ private static final String VERSION = initVersion ();
16+
17+ private static String initVersion () {
18+ final String version = NullnessUtil .castNonNull ( Version .class .getPackage () ).getImplementationVersion ();
19+ return version != null ? version : "[WORKING]" ;
20+ }
1821
1922 private Version () {
2023 }
2124
2225 public static String getVersionString () {
23- if ( version == null ) {
24- version = NullnessUtil .castNonNull ( Version .class .getPackage () ).getImplementationVersion ();
25- if ( version == null ) {
26- version = "[WORKING]" ;
27- }
28- }
29- return version ;
26+ return VERSION ;
3027 }
3128}
You can’t perform that action at this time.
0 commit comments