Class VersionCorrector

java.lang.Object
org.modelingvalue.gradle.mvgplugin.VersionCorrector

public class VersionCorrector extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • computeAndSetVersion

      public void computeAndSetVersion()
      Compute the vacant version and set it on all projects. On CI the vacant version is the patch successor of the highest version-like git tag, or the gradle.properties version itself when that is higher than every tag (the way to deliberately start a new minor/major release line). Outside CI the version is always "dev": local artifacts are not for distribution and must not look like a release. This must be called at configuration time so that Gradle's configuration resolution (which freezes artifact file paths) sees the correct version. The gradle.properties file is intentionally not modified — the next vacant version is always derived from git tags.
    • vacantVersion

      public static String vacantVersion(String propVersion, List<String> tags)
      The vacant version is the patch successor of the highest version-like tag, or the gradle.properties version itself when that is higher than every tag (or when there are no version-like tags at all).