Can someone explain the exact purpose of build number? I am trying to understand what to return from PluginUpgradeTask.getBuildNumber().
The linked JavaDoc above says:
Build number is specified in atlassian-plugin.xml inside element. eg: <param name=“build”>1</param>
Unfortunately, I can’t find any example or explanation that explains when and why to set this value and what’s the impact of doing so.
Additionally, Atlassian Marketplace has a build number property per plugin version too. Is this in any way linked to or based off <param name="build">1</param>?
Return an integer > 0, for example 1.
For the next migrations that you need, return a number bigger than the last number you’ve used (e.g. 2, 3, 4 …).
You can have multiple migrations (Java classes implementing PluginUpgradeTask) and they will be run in order. The build number should be greater than the last migration done. I would avoid having the same build number in two different migrations.