I have a such case. I need to save curent date after every release build with gradle. Is there any possibility to save date to gradle.properties file that I can read it in the next build job?
My files: gradle.properties:
version=0.0.1
date=
build.gradle:
task changeDate() {
file = new File("changelogs/CHANGELOG_RELEASE_FROM_"+getDate()+".md");
project.setProperty("date",getDate());
}
It dosent work and it doesn't save date variable into gradle.properties.
So I wish that I can have a date from release in my gradle.properties file:
gradle.properties:
version=0.0.1
date=12.04.2019