For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

NativePlatform

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

Since

2.2

Functions

Link copied to clipboard
abstract fun architecture(name: String)
Sets the cpu architecture being targeted.
Link copied to clipboard
The cpu architecture being targeted.
Link copied to clipboard
Returns a human consumable name for this platform.
Link copied to clipboard
abstract fun getName(): String
The object's name.
Link copied to clipboard
The operating system being targeted.
Link copied to clipboard
abstract fun operatingSystem(name: String)
Sets the operating system being targeted.