Package 

Object VersionInfo


  • 
    public class VersionInfo
    
                        

    VersionInfo exposes SDK release metadata at runtime.

    The string is wired through BuildConfig.SDK_VERSION, which build.gradle.kts sets from the same sdkVersion constant it uses for the Maven coordinates. Bumping the version in build.gradle.kts updates this automatically.

    major, minor and patch are derived from versionString for code that needs to gate behaviour on the SDK version (e.g. if (VersionInfo.major > 0 || (VersionInfo.major == 0 && VersionInfo.minor >= 5)) { … }).

    • Method Detail

      • getMajor

         final Integer getMajor()

        Major version component (0 in "0.5.1").

      • getMinor

         final Integer getMinor()

        Minor version component (5 in "0.5.1").

      • getPatch

         final Integer getPatch()

        Patch version component (1 in "0.5.1").

        Any non-numeric suffix (e.g. "-SNAPSHOT", "-rc1") is dropped so a pre-release build still parses to a sensible integer.