Gradle: what is the ant buildnumber symbol

I am trying to port the ant script to gradle and still have not found the gradle analog of ant <buildnumber/> , which is the auto-increment number used in the assembly process.

+4
source share
2 answers

Gradle has no <buildnumber/> counterpart, but you can always use the Ant task.

+4
source

If there are any other noob like me that don’t know how to accomplish ant goals and access their properties, here is an example:

 jar.doFirst { ant.buildnumber() manifest { attributes{ 'Implementation-Version': ant.antProject.properties['build.number'] ) } } 
+2
source

Source: https://habr.com/ru/post/1442689/


All Articles