I have a project built as gradle component , in Jenkins, and published to artifactory server.
I have a version text file that contains my version , and each time I want to increase the version I need to change the file , commit the change and run in jenkins the gradle task that publishing the artifacts.
I'm looking for a better way doing it- avoiding commit the version manually, might be depends on the jenkins build number .
my question is: what should be written in my text version file so it will take the build number from Jenkins ($BUILD_NUMBER)?