当前位置: 首页>>代码示例>>Java>>正文


Java PlatformContainer类代码示例

本文整理汇总了Java中org.gradle.platform.base.PlatformContainer的典型用法代码示例。如果您正苦于以下问题:Java PlatformContainer类的具体用法?Java PlatformContainer怎么用?Java PlatformContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PlatformContainer类属于org.gradle.platform.base包,在下文中一共展示了PlatformContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBinaries

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Mutate
public void createBinaries(BinaryContainer binaries, PlatformContainer platforms, BinaryNamingSchemeBuilder namingSchemeBuilder,
                           NamedDomainObjectCollection<JvmLibrarySpec> libraries, @Path("buildDir") File buildDir, ServiceRegistry serviceRegistry, JavaToolChainRegistry toolChains) {
    Instantiator instantiator = serviceRegistry.get(Instantiator.class);

    List<Action<? super JarBinarySpec>> actions = Lists.newArrayList();
    actions.add(new JarBinarySpecInitializer(buildDir));
    actions.add(new MarkBinariesBuildable());
    Action<JarBinarySpec> initAction = Actions.composite(actions);
    JarBinariesFactory factory = new DefaultJarBinariesFactory(instantiator, initAction);

    Action<JvmLibrarySpec> createBinariesAction =
            new JvmLibrarySpecInitializer(factory, namingSchemeBuilder, toolChains, platforms);

    for (JvmLibrarySpec jvmLibrary : libraries) {
        createBinariesAction.execute(jvmLibrary);
        binaries.addAll(jvmLibrary.getBinaries());
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:20,代码来源:JvmComponentPlugin.java

示例2: createNativeBinaries

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Mutate
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);
    BinaryNamingSchemeBuilder namingSchemeBuilder = new DefaultBinaryNamingSchemeBuilder();
    Action<NativeComponentSpec> createBinariesAction =
            new NativeComponentSpecInitializer(factory, namingSchemeBuilder, toolChains, platforms, buildTypes, flavors);

    for (NativeComponentSpec component : nativeComponents) {
        createBinariesAction.execute(component);
        binaries.addAll(component.getBinaries());
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:22,代码来源:NativeComponentModelPlugin.java

示例3: repositories

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Model
Repositories repositories(ServiceRegistry serviceRegistry, FlavorContainer flavors, PlatformContainer platforms, BuildTypeContainer buildTypes) {
    Instantiator instantiator = serviceRegistry.get(Instantiator.class);
    SourceDirectorySetFactory sourceDirectorySetFactory = serviceRegistry.get(SourceDirectorySetFactory.class);
    NativePlatforms nativePlatforms = serviceRegistry.get(NativePlatforms.class);
    FileCollectionFactory fileCollectionFactory = serviceRegistry.get(FileCollectionFactory.class);
    Action<PrebuiltLibrary> initializer = new PrebuiltLibraryInitializer(instantiator, fileCollectionFactory, nativePlatforms, platforms.withType(NativePlatform.class), buildTypes, flavors);
    return new DefaultRepositories(instantiator, sourceDirectorySetFactory, initializer);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:NativeComponentModelPlugin.java

示例4: registerFactoryForCustomNativePlatforms

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Defaults
public void registerFactoryForCustomNativePlatforms(PlatformContainer platforms, final Instantiator instantiator) {
    NamedDomainObjectFactory<NativePlatform> nativePlatformFactory = new NamedDomainObjectFactory<NativePlatform>() {
        public NativePlatform create(String name) {
            return instantiator.newInstance(DefaultNativePlatform.class, name);
        }
    };

    platforms.registerFactory(NativePlatform.class, nativePlatformFactory);

    platforms.registerFactory(Platform.class, nativePlatformFactory);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:NativeComponentModelPlugin.java

示例5: createAndroidPlatforms

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Mutate
public void createAndroidPlatforms(PlatformContainer platforms, NdkHandler ndkHandler) {
    if (!ndkHandler.isNdkDirConfigured()) {
        return;
    }
    // Create android platforms.
    ToolchainConfiguration.configurePlatforms(platforms, ndkHandler);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:NdkComponentModelPlugin.java

示例6: configurePlatforms

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
public static void configurePlatforms(PlatformContainer platforms, NdkHandler ndkHandler) {
    for (Abi abi : ndkHandler.getSupportedAbis()) {
        NativePlatform platform = platforms.maybeCreate(abi.getName(), NativePlatform.class);

        // All we care is the name of the platform.  It doesn't matter what the
        // architecture is, but it must be set to non-x86 so that it does not match
        // the default supported platform.
        platform.architecture("ppc");
        platform.operatingSystem("linux");
    }

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToolchainConfiguration.java

示例7: registerJavaPlatformType

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Mutate
public void registerJavaPlatformType(PlatformContainer platforms, ServiceRegistry serviceRegistry) {
    final Instantiator instantiator = serviceRegistry.get(Instantiator.class);
    platforms.registerFactory(JavaPlatform.class, new NamedDomainObjectFactory<JavaPlatform>() {
        public JavaPlatform create(String name) {
            return instantiator.newInstance(DefaultJavaPlatform.class, name);
        }
    });
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:JvmComponentPlugin.java

示例8: createJavaPlatforms

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Mutate
public void createJavaPlatforms(PlatformContainer platforms, ServiceRegistry serviceRegistry) {
    final Instantiator instantiator = serviceRegistry.get(Instantiator.class);
    //Create default platforms available for Java
    for (JavaVersion javaVersion: JavaVersion.values()) {
        DefaultJavaPlatform javaPlatform = instantiator.newInstance(DefaultJavaPlatform.class, javaVersion);
        platforms.add(javaPlatform);
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:JvmComponentPlugin.java

示例9: NativeComponentSpecInitializer

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
public NativeComponentSpecInitializer(NativeBinariesFactory factory, BinaryNamingSchemeBuilder namingSchemeBuilder, NativeToolChainRegistryInternal toolChainRegistry,
                                      PlatformContainer platforms, Collection<? extends BuildType> allBuildTypes, Collection<? extends Flavor> allFlavors) {
    this.factory = factory;
    this.namingSchemeBuilder = namingSchemeBuilder;
    this.toolChainRegistry = toolChainRegistry;
    this.allBuildTypes.addAll(allBuildTypes);
    this.allFlavors.addAll(allFlavors);
    this.platforms = platforms;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:NativeComponentSpecInitializer.java

示例10: repositories

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Model
Repositories repositories(ServiceRegistry serviceRegistry, FlavorContainer flavors, PlatformContainer platforms, BuildTypeContainer buildTypes) {
    Instantiator instantiator = serviceRegistry.get(Instantiator.class);
    FileResolver fileResolver = serviceRegistry.get(FileResolver.class);
    Action<PrebuiltLibrary> initializer = new PrebuiltLibraryInitializer(instantiator, platforms.withType(NativePlatform.class), buildTypes, flavors);
    return new DefaultRepositories(instantiator, fileResolver, initializer);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:8,代码来源:NativeComponentModelPlugin.java

示例11: registerNativePlatformFactory

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Mutate
public void registerNativePlatformFactory(PlatformContainer platforms, ServiceRegistry serviceRegistry) {
    final Instantiator instantiator = serviceRegistry.get(Instantiator.class);
    NamedDomainObjectFactory<NativePlatform> nativePlatformFactory = new NamedDomainObjectFactory<NativePlatform>() {
        public NativePlatform create(String name) {
            return instantiator.newInstance(DefaultNativePlatform.class, name);
        }
    };

    //TODO freekh: remove cast/this comment when registerDefault exists on interface
    ((DefaultPlatformContainer) platforms).registerDefaultFactory(nativePlatformFactory);
    platforms.registerFactory(NativePlatform.class, nativePlatformFactory);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:14,代码来源:NativeComponentModelPlugin.java

示例12: createDefaultPlatforms

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Finalize
public void createDefaultPlatforms(PlatformContainer platforms) {
    if (platforms.withType(NativePlatform.class).isEmpty()) {
        // TODO:DAZ Create a set of known platforms, rather than a single 'default'
        NativePlatform defaultPlatform = platforms.create(NativePlatform.DEFAULT_NAME, NativePlatform.class);
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:8,代码来源:NativeComponentModelPlugin.java

示例13: DefaultPlatformResolvers

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
public DefaultPlatformResolvers(PlatformContainer platforms) {
    this.platforms = platforms;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultPlatformResolvers.java

示例14: platforms

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Model
PlatformContainer platforms(Instantiator instantiator) {
    return instantiator.newInstance(DefaultPlatformContainer.class, instantiator);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:ComponentModelBasePlugin.java

示例15: platformResolver

import org.gradle.platform.base.PlatformContainer; //导入依赖的package包/类
@Hidden @Model
PlatformResolvers platformResolver(PlatformContainer platforms) {
    return new DefaultPlatformResolvers(platforms);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:ComponentModelBasePlugin.java


注:本文中的org.gradle.platform.base.PlatformContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。