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 {
19
19
plugins {
20
20
id " local.module"
21
21
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
23
23
id ' org.hibernate.orm.database-service' apply false
24
24
id ' biz.aQute.bnd' version ' 7.1.0' apply false
25
25
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ plugins {
8
8
id " local.publishing-java-module"
9
9
id " local.publishing-group-relocation"
10
10
11
+ id " org.hibernate.build.version-injection" apply true
11
12
id " org.hibernate.orm.antlr"
12
13
id " local-xjc-plugin"
13
14
}
@@ -127,6 +128,10 @@ xjc {
127
128
}
128
129
}
129
130
131
+ versionInjection {
132
+ into( ' org.hibernate.Version' , ' initVersion' )
133
+ }
134
+
130
135
task copyBundleResourcesXml (type : Copy ) {
131
136
inputs. property( " db" , db )
132
137
inputs. property( " dbHost" , dbHost )
Original file line number Diff line number Diff line change 6
6
plugins {
7
7
id " local.publishing-java-module"
8
8
id " local.publishing-group-relocation"
9
- id " org.hibernate.build.version-injection"
9
+ id " org.hibernate.build.version-injection" apply true
10
10
}
11
11
12
12
description = ' Hibernate compile-time tooling'
@@ -77,6 +77,10 @@ configurations {
77
77
jakartaDataCompileOnly. extendsFrom(testCompileOnly)
78
78
}
79
79
80
+ versionInjection {
81
+ into( ' org.hibernate.processor.Version' , ' initVersion' )
82
+ }
83
+
80
84
def quarkusOrmPanacheTestTask = tasks. register( ' quarkusOrmPanacheTest' , Test ) {
81
85
description = ' Runs the Quarkus ORM Panache tests.'
82
86
group = ' verification'
Original file line number Diff line number Diff line change 6
6
7
7
import org .hibernate .processor .util .NullnessUtil ;
8
8
9
- import org .checkerframework .checker .nullness .qual .Nullable ;
10
-
11
9
/**
12
10
* Information about the Meta Model Generator version.
13
11
*
14
12
* @author Hardy Ferentschik
15
13
*/
16
14
public 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
+ }
18
21
19
22
private Version () {
20
23
}
21
24
22
25
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 ;
30
27
}
31
28
}
You can’t perform that action at this time.
0 commit comments