Skip to content

Commit

Permalink
Make snapshots unique across timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
leviem1 committed Aug 19, 2020
1 parent ae51c28 commit 343427f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ group = "com.snowypeaksystems.exampleplugin"
if (hasProperty('ver')) {
version = ver.substring(1)
} else {
version = new SimpleDateFormat("yyMMdd-HHmm").format(new Date())
SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd-HHmm")
sdf.setTimeZone(TimeZone.getTimeZone("UTC"))
version = sdf.format(new Date()).toString()
}

java {
Expand Down Expand Up @@ -68,4 +70,4 @@ task release {

file(dirStr + rootProject.name + '-' + version + '-SNAPSHOT.jar').renameTo(dirStr + rootProject.name + '.jar')
}
}
}

0 comments on commit 343427f

Please sign in to comment.