Class OperatingSystemFamily
java.lang.Object
org.gradle.nativeplatform.OperatingSystemFamily
- All Implemented Interfaces:
Named
-
Nested Class Summary
Nested classes/interfaces inherited from interface Named
Named.Namer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe Linux operating system family.static final StringThe macOS operating system family.static final Attribute<OperatingSystemFamily> Of.static final StringThe Windows operating system family. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
OPERATING_SYSTEM_ATTRIBUTE
-
WINDOWS
-
LINUX
-
MACOS
-
-
Constructor Details
-
OperatingSystemFamily
public OperatingSystemFamily()
-
-
Method Details
-
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 withtoString()in diagnostics, so the two disagreeing produces output that contradicts the behavior it describes. This is easy to miss on anenum, which inherits atoString()returningEnum.name(). -
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
-