Class Versioning


  • public final class Versioning
    extends Object
    • Method Detail

      • versionNumber

        public static int versionNumber​(@NotNull
                                        @NotNull org.gradle.api.JavaVersion version)
      • versionString

        public static String versionString​(int version)
      • versionString

        public static String versionString​(@NotNull
                                           @NotNull org.gradle.api.JavaVersion version)
      • isSnapshot

        public static boolean isSnapshot​(@NotNull
                                         @NotNull org.gradle.api.Project project)
      • isRelease

        public static boolean isRelease​(@NotNull
                                        @NotNull org.gradle.api.Project project)
        Verify that this project is checked out to a release version.

        This means that:

        • The version does not contain SNAPSHOT
        • The project is managed within a Git repository
        • the current head commit is tagged
        Parameters:
        project - the project to check
        Returns:
        if the project is recognized as a release