public void createNativeBinaries(BinaryContainer binaries, NamedDomainObjectSet<NativeComponentSpec> nativeComponents,
LanguageRegistry languages, NativeToolChainRegistryInternal toolChains,
PlatformContainer platforms, BuildTypeContainer buildTypes, FlavorContainer flavors,
ServiceRegistry serviceRegistry, @Path("buildDir") File buildDir) {
Instantiator instantiator = serviceRegistry.get(Instantiator.class);
NativeDependencyResolver resolver = serviceRegistry.get(NativeDependencyResolver.class);
Action<NativeBinarySpec> configureBinaryAction = new NativeBinarySpecInitializer(buildDir);
Action<NativeBinarySpec> setToolsAction = new ToolSettingNativeBinaryInitializer(languages);
Action<NativeBinarySpec> setDefaultTargetsAction = new ToolSettingNativeBinaryInitializer(languages);
@SuppressWarnings("unchecked") Action<NativeBinarySpec> initAction = Actions.composite(configureBinaryAction, setToolsAction, new MarkBinariesBuildable());
NativeBinariesFactory factory = new DefaultNativeBinariesFactory(instantiator, initAction, resolver);