Class OperatingSystemFamily

java.lang.Object
org.gradle.nativeplatform.OperatingSystemFamily
All Implemented Interfaces:
Named

public abstract class OperatingSystemFamily extends 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:
4.7
  • Field Details

  • Constructor Details

    • OperatingSystemFamily

      public OperatingSystemFamily()
  • Method Details

    • getName

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

      Must be constant for the life of the object.

      Implementations should not declare a Object.toString() that returns anything other than this name. Gradle derives the name from this method wherever it needs one, but renders the object with toString() in diagnostics, so the two disagreeing produces output that contradicts the behavior it describes. This is easy to miss on an enum, which inherits a toString() returning Enum.name().

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

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

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

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