Search in sources :

Example 1 with MachineArchitecture

use of org.gradle.nativeplatform.MachineArchitecture in project gradle by gradle.

the class DefaultTargetMachineFactory method host.

/**
 * Returns a {@link TargetMachine} representing the operating system and architecture of the current host.
 */
public TargetMachine host() {
    DefaultNativePlatform host = DefaultNativePlatform.host();
    OperatingSystemFamily operatingSystemFamily = objectFactory.named(OperatingSystemFamily.class, host.getOperatingSystem().toFamilyName());
    MachineArchitecture machineArchitecture = objectFactory.named(MachineArchitecture.class, host.getArchitecture().getName());
    return new TargetMachineImpl(operatingSystemFamily, machineArchitecture);
}
Also used : OperatingSystemFamily(org.gradle.nativeplatform.OperatingSystemFamily) MachineArchitecture(org.gradle.nativeplatform.MachineArchitecture) DefaultNativePlatform(org.gradle.nativeplatform.platform.internal.DefaultNativePlatform)

Aggregations

MachineArchitecture (org.gradle.nativeplatform.MachineArchitecture)1 OperatingSystemFamily (org.gradle.nativeplatform.OperatingSystemFamily)1 DefaultNativePlatform (org.gradle.nativeplatform.platform.internal.DefaultNativePlatform)1