File tree Expand file tree Collapse file tree 3 files changed +1
-25
lines changed
grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util Expand file tree Collapse file tree 3 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 26
26
# # VSCode
27
27
.vscode /
28
28
.devcontainer /
29
-
30
- # # build generated file
31
- grpc-common-spring-boot /src /main /java /net /devh /boot /grpc /common /util /Constants.java
Original file line number Diff line number Diff line change 72
72
buildRevision = versioning. info. commit
73
73
}
74
74
75
- task createConstantsFile (type : Copy ) {
76
- from(" grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util/Constants.java.template" ) {
77
- rename " Constants.java.template" , " Constants.java"
78
- filter(org.apache.tools.ant.filters.ReplaceTokens , tokens : [
79
- versionStringPlaceholder : " v${ projectVersion} " . toString(),
80
- ])
81
- }
82
- into " grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util"
83
- }
84
- clean. doFirst {
85
- delete " grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util/Constants.java"
86
- }
87
-
88
75
allprojects {
89
76
apply plugin : ' java'
90
77
apply plugin : ' idea'
@@ -147,12 +134,8 @@ allprojects {
147
134
include ' LICENSE'
148
135
into ' META-INF'
149
136
}
150
- dependsOn createConstantsFile
151
137
}
152
138
153
- compileJava. dependsOn createConstantsFile
154
- spotlessJava. dependsOn createConstantsFile
155
-
156
139
// Generate MANIFEST.MF
157
140
jar {
158
141
manifest {
@@ -241,10 +224,6 @@ allprojects { project ->
241
224
}
242
225
}
243
226
244
- delombok {
245
- dependsOn createConstantsFile
246
- }
247
-
248
227
// Javadoc Task
249
228
javadoc {
250
229
dependsOn delombok
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public final class Constants {
24
24
/**
25
25
* A constant that defines the current version of the library.
26
26
*/
27
- public static final String VERSION = "@versionStringPlaceholder@" ;
27
+ public static final String VERSION = Constants . class . getPackage (). getImplementationVersion () ;
28
28
29
29
30
30
/**
You can’t perform that action at this time.
0 commit comments