File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 30
30
}
31
31
}
32
32
33
+ ext. reloadVersion = () -> projectVersion = Version . parseProjectVersion( readVersionFromProperties( rootProject. projectVersionFile ) )
34
+
33
35
// nexusPublishing uses group and version
34
36
// as defaults
35
37
group = projectGroup
@@ -201,6 +203,10 @@ subprojects {
201
203
}
202
204
}
203
205
206
+ void reloadVersion () {
207
+ project. version = Version . parseProjectVersion( null )
208
+ }
209
+
204
210
private static String readVersionFromProperties (File file ) {
205
211
if ( ! file. exists() ) {
206
212
throw new FileNotFoundException ( " Version file $file . canonicalPath does not exists" )
@@ -276,4 +282,4 @@ class Version {
276
282
String getFamily () {
277
283
" $major . $minor "
278
284
}
279
- }
285
+ }
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ def releasePreparePostGitTask = tasks.register( 'gitTasksAfterRelease' ) {
230
230
void updateVersionFile (String version ) {
231
231
logger. lifecycle( " Updating `gradle/version.properties` version to `${ version} `" )
232
232
project. projectVersionFile. text = " projectVersion=${ version} "
233
- project. version = Version . parseProjectVersion( version )
233
+ project. version =
234
234
}
235
235
236
236
def publishReleaseArtifactsTask = tasks. register( ' publishReleaseArtifacts' ) {
You can’t perform that action at this time.
0 commit comments