How can I append a timestamp to the jar file name when running the gradle build
command?
The jar name I have now:
abc-0.0.1-SNAPSHOT.jar
What I actually want:
abc-0.0.1-SNAPSHOT20180721101136.jar
My build.gradle file:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.abc'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
I've tried build.date = '${timestamp}'
, but that doesn't work.
I've also tried doFirst
, but in vain.