Class OperatingSystemFamily

  • All Implemented Interfaces:
    Named

    public abstract class OperatingSystemFamily
    extends java.lang.Object
    implements Named
    Represents the operating system of a configuration. Typical operating system include Windows, Linux, and macOS. This interface allows the user to customize operating systems by implementing this interface.
    Since:
    5.1
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.gradle.api.Named

        Named.Namer
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String getName()
      The object's name.
      boolean isLinux()
      Is this the Linux operating system family?
      boolean isMacOs()
      Is this the macOS operating system family?
      boolean isWindows()
      Is this the Windows operating system family?
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OperatingSystemFamily

        public OperatingSystemFamily()
    • Method Detail

      • getName

        @Input
        public abstract java.lang.String getName()
        The object's name.

        Must be constant for the life of the object.

        Specified by:
        getName in interface Named
        Returns:
        The name. Never null.
      • isWindows

        public boolean isWindows()
        Is this the Windows operating system family?
      • isLinux

        public boolean isLinux()
        Is this the Linux operating system family?
      • isMacOs

        public boolean isMacOs()
        Is this the macOS operating system family?