Platform

API Documentation:Platform

Note: This class is incubating and may change in a future version of Gradle.

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"
            }
        }
    }

Properties

PropertyDescription
architecture
Incubating

The cpu architecture being targeted. Defaults to the default architecture produced by the tool chain.

operatingSystem
Incubating

The operating system being targeted. Defaults to the default operating system targeted by the tool chain (normally the current operating system).

Methods

MethodDescription
architecture(notation)
Incubating

Sets the cpu architecture being targeted. The architecture is provided as a string name, which is translated into one of the supported architecture types.

operatingSystem(notation)
Incubating

Sets the operating system being targeted. The operating system is provided as a string name, which is translated into one of the supported operating system types.

Script blocks

No script blocks

Property details

Architecture architecture (read-only)

Note: This property is incubating and may change in a future version of Gradle.

The cpu architecture being targeted. Defaults to the default architecture produced by the tool chain.

OperatingSystem operatingSystem (read-only)

Note: This property is incubating and may change in a future version of Gradle.

The operating system being targeted. Defaults to the default operating system targeted by the tool chain (normally the current operating system).

Method details

void architecture(Object notation)

Note: This method is incubating and may change in a future version of Gradle.

Sets the cpu architecture being targeted. The architecture is provided as a string name, which is translated into one of the supported architecture types.

Instruction Set32-bit names64-bit names
Intel x86"x86", "i386", "ia-32""x86_64", "amd64", "x64", "x86-64"
Intel Itanium"ia-64"
Power PC"ppc""ppc64"
Sparc"sparc", "sparc32", "sparc-v7", "sparc-v8""sparc64", "ultrasparc", "sparc-v9"
ARM"arm"

void operatingSystem(Object notation)

Note: This method is incubating and may change in a future version of Gradle.

Sets the operating system being targeted. The operating system is provided as a string name, which is translated into one of the supported operating system types.

Operating SystemAliases
Windows"windows"
GNU/Linux"linux"
Mac OS X"osx", "mac os x", "darwin"
Solaris"solaris", "sunos"