Interface VersionInfo


public interface VersionInfo
What the calculation concluded, readable from any project's build logic.

Registered on every project by the settings plugin, so build logic never reaches across project boundaries to obtain it.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.Property<Bump>
    What the analysed commits implied, before any override or floor was applied.
    org.gradle.api.provider.Property<Boolean>
    Whether the range warrants a release.
    org.gradle.api.provider.Property<String>
    The commit the build was produced from.
    org.gradle.api.provider.Property<String>
    The same string assigned as project.version.
  • Method Details

    • getVersion

      org.gradle.api.provider.Property<String> getVersion()
      The same string assigned as project.version.
    • getBumpType

      org.gradle.api.provider.Property<Bump> getBumpType()
      What the analysed commits implied, before any override or floor was applied.
    • getReleasable

      org.gradle.api.provider.Property<Boolean> getReleasable()
      Whether the range warrants a release. Gate publishing on this rather than inferring intent from the version string: a range with no releasable commits still gets a -SNAPSHOT version, because Gradle requires one.
    • getSha

      org.gradle.api.provider.Property<String> getSha()
      The commit the build was produced from. Belongs in the jar manifest, not in the coordinate - a version that changes every commit is not a usable snapshot.