public void apply(final ProjectInternal project) {
project.apply(Collections.singletonMap("plugin", ComponentModelBasePlugin.class));
ProjectSourceSet sources = project.getExtensions().getByType(ProjectSourceSet.class);
ComponentSpecContainer components = project.getExtensions().getByType(ComponentSpecContainer.class);
components.registerFactory(NativeExecutableSpec.class, new NativeExecutableSpecFactory(instantiator, sources, project));
NamedDomainObjectContainer<NativeExecutableSpec> nativeExecutables = components.containerWithType(NativeExecutableSpec.class);
components.registerFactory(NativeLibrarySpec.class, new NativeLibrarySpecFactory(instantiator, sources, project));
NamedDomainObjectContainer<NativeLibrarySpec> nativeLibraries = components.containerWithType(NativeLibrarySpec.class);
project.getExtensions().create("nativeRuntime", DefaultNativeComponentExtension.class, nativeExecutables, nativeLibraries);
// TODO:DAZ Remove these: should not pollute the global namespace
project.getExtensions().add("nativeComponents", components.withType(NativeComponentSpec.class));
project.getExtensions().add("executables", nativeExecutables);
project.getExtensions().add("libraries", nativeLibraries);
instantiateDefaultPlatforms();
}