api / org.gradle.platform.base / Platform

Platform

@Incubating interface Platform : 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.

Functions

getDisplayName

abstract fun getDisplayName(): String

Returns a human consumable name for this platform.

getName

abstract fun getName(): String

Inheritors

JavaPlatform

interface JavaPlatform : Platform

Defines and configures a Java SE runtime environment, consisting of a JVM runtime and a set of class libraries.

 plugins { id "jvm-component" id "java-lang" } model { components { myLib(JvmLibrarySpec) { targetPlatform "java6" } } } 

NativePlatform

interface NativePlatform : Platform, Describable

A target platform for building native binaries. Each target platform is given a name, and may optionally be given a specific Architecture and/or OperatingSystem to target.

 model { platforms { windows_x86 { architecture "i386" operatingSystem "windows" } } } 

PlayPlatform

interface PlayPlatform : Platform

Defines and configures a Play Framework environment including versions of Play, Scala and Java.

ScalaPlatform

interface ScalaPlatform : Platform

Defines and configures a Scala Platform.