Interface Platform

All Superinterfaces:
Named
All Known Subinterfaces:
NativePlatform

public interface Platform extends Named
The platform or runtime that a binary is designed to run on. Examples: the JvmPlatform defines a java runtime, while the NativePlatform defines the Operating System and Architecture for a native app.
Since:
2.2
  • Nested Class Summary

    Nested classes/interfaces inherited from interface Named

    Named.Namer
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a human consumable name for this platform.
    The object's name.
  • Method Details

    • getName

      @Input String getName()
      Description copied from interface: Named
      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.
    • getDisplayName

      @Internal String getDisplayName()
      Returns a human consumable name for this platform.
      Since:
      2.2