I want to use gitflow in combination with semantic versioning. In gitflow, you bump version numbers on every release or hotfix branch. This inevitably leads to version conflicts if a new development cycle (with a new version number) is started while the current release process is still ongoing.
Let's say, 1.0.0 is on master, and on develop I start the new 2.0.0 release. Now, a hotfix from master occurs (1.0.1). When merging the hotfix onto the develop branch, a conflict will happen.
There is a somewhat similar question here on SE@Stackexchange, with a major difference: Because my gradle and maven build tools heavily rely on version numbers, I have to store them in my code and can't just generate them when building a release. And I have to raise the version number on develop for a new release cycle, otherwise artifacts will get overridden.
So how can I manage my branches and version numbers so that no merge conflicts can occur?