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


Java NamedDomainObjectContainer类代码示例

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


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

示例1: AtlasExtension

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public AtlasExtension(@NonNull final ProjectInternal project,
                      @NonNull Instantiator instantiator,
                      @NonNull NamedDomainObjectContainer<T> buildTypes,
                      @NonNull NamedDomainObjectContainer<PatchConfig> patchConfigs,
                      @NonNull NamedDomainObjectContainer<DexConfig>dexConfigs) {

    logger = Logging.getLogger(this.getClass());
    this.project = project;

    this.patchConfigs = patchConfigs;
    this.dexConfigs = dexConfigs;
    this.buildTypes = buildTypes;
    this.multiDexConfigs = project.container(MultiDexConfig.class, new MultiDexConfigFactory(
        instantiator,project, project.getLogger()));

    tBuildConfig = (Z) instantiator.newInstance(TBuildConfig.class);
    manifestOptions = instantiator.newInstance(ManifestOptions.class);
    bundleConfig = instantiator.newInstance(BundleConfig.class);
}
 
开发者ID:alibaba,项目名称:atlas,代码行数:20,代码来源:AtlasExtension.java

示例2: createExtendsion

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public AtlasExtension createExtendsion(Project project, Instantiator instantiator) {

        AtlasExtension atlasExtension = getExtendsion(project);

        if (null != atlasExtension) {
            return atlasExtension;
        }

        final NamedDomainObjectContainer<TBuildType> buildTypeContainer = project.container(TBuildType.class,
                                                                                            new TBuildTypeFactory(
                                                                                                instantiator, project,
                                                                                                project.getLogger()));
        final NamedDomainObjectContainer<PatchConfig> patchConfigContainer = project.container(PatchConfig.class,
                                                                                               new PatchConfigFactory(
                                                                                                   instantiator,
                                                                                                   project, project
                                                                                                       .getLogger()));
        final NamedDomainObjectContainer<DexConfig>dexConfigContainer = project.container(DexConfig.class,new DexConfigFactory(instantiator,project,project.getLogger()));

        return project.getExtensions().create("atlas", AtlasExtension.class, project, instantiator,
                                              buildTypeContainer, patchConfigContainer,dexConfigContainer);

    }
 
开发者ID:alibaba,项目名称:atlas,代码行数:24,代码来源:AtlasExtensionFactory.java

示例3: getVariants

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
@Override
public NamedDomainObjectContainer<ConfigurationVariant> getVariants() {
    if (variants == null) {
        // Create variants container only as required
        variants = new FactoryNamedDomainObjectContainer<ConfigurationVariant>(ConfigurationVariant.class, instantiator, new NamedDomainObjectFactory<ConfigurationVariant>() {
            @Override
            public ConfigurationVariant create(String name) {
                return instantiator.newInstance(DefaultVariant.class, name, parentAttributes, artifactNotationParser, fileCollectionFactory);
            }
        });
    }
    return variants;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:DefaultConfigurationPublications.java

示例4: addMarkerPublications

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
@Finalize
public void addMarkerPublications(PublishingExtension publishing, GradlePluginDevelopmentExtension pluginDevelopment) {
    if (!pluginDevelopment.isAutomatedPublishing()) {
        return;
    }

    PublicationContainer publications = publishing.getPublications();
    NamedDomainObjectContainer<PluginDeclaration> declaredPlugins = pluginDevelopment.getPlugins();

    for (PluginDeclaration declaration : declaredPlugins) {
        createMavenMarkerPublication(declaration, (MavenPublication) publications.getByName("pluginMaven"), publications);
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:MavenPluginPublishingRules.java

示例5: addMarkerPublications

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
@Finalize
public void addMarkerPublications(PublishingExtension publishing, GradlePluginDevelopmentExtension pluginDevelopment) {
    if (!pluginDevelopment.isAutomatedPublishing()) {
        return;
    }
    PublicationContainer publications = publishing.getPublications();
    NamedDomainObjectContainer<PluginDeclaration> declaredPlugins = pluginDevelopment.getPlugins();
    for (PluginDeclaration declaration : declaredPlugins) {
        createIvyMarkerPublication(declaration, (IvyPublication) publications.getByName("pluginIvy"), publications);
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:IvyPluginPublishingRules.java

示例6: setProperty

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public static void setProperty(Object object,
                               String fieldName,
                               String value)
    throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchFieldException {

    String[] fieldNames = fieldName.split("\\.");

    Object last = object;
    for (int i = 0; i < fieldNames.length - 1; i++) {

        String field = fieldNames[i];

        if (last instanceof NamedDomainObjectContainer) {
            last = ((NamedDomainObjectContainer)last).maybeCreate(field);
        } else {
            Field declaredField = last.getClass().getField(field);
            declaredField.setAccessible(true);

            if (null == declaredField.get(last)) {
                Object newInstance = declaredField.getType()
                    .getConstructors()
                    .getClass()
                    .newInstance();
                declaredField.set(last, newInstance);
            }

            last = declaredField.get(last);
        }
    }

    BeanUtils.setProperty(last, fieldNames[fieldNames.length - 1], value);
}
 
开发者ID:alibaba,项目名称:atlas,代码行数:33,代码来源:AtlasConfigHelper.java

示例7: configureForSourceSets

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
private void configureForSourceSets(NamedDomainObjectContainer<AndroidSourceSet> sourceSets) {
    sourceSets.all(sourceSet -> {
        Task task = project.getTasks().create(getTaskName(sourceSet, getTaskBaseName(), null), getCastedTaskType());
        task.setGroup(JavaBasePlugin.VERIFICATION_GROUP);
        configureForSourceSet(sourceSet, (T)task);
    });
}
 
开发者ID:freefair,项目名称:android-gradle-plugins,代码行数:8,代码来源:SourceSetBasedCodeQualityPlugin.java

示例8: createConfigDsl

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
private SamConfig createConfigDsl() {
	log.debug("Setup serverless config DSL");
	final NamedDomainObjectContainer<Stage> stages = project.container(Stage.class);
	final SamConfigDsl samConfig = project.getExtensions().create("serverless", SamConfigDsl.class, project,
			stages);
	((ExtensionAware) samConfig).getExtensions().add("stages", stages);
	return new SamConfig(project, samConfig);
}
 
开发者ID:kaklakariada,项目名称:aws-sam-gradle,代码行数:9,代码来源:AwsSamDeployPlugin.java

示例9: TestedExtension

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public TestedExtension(@NonNull ProjectInternal project, @NonNull Instantiator instantiator,
        @NonNull AndroidBuilder androidBuilder, @NonNull SdkHandler sdkHandler,
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs,
        @NonNull ExtraModelInfo extraModelInfo, boolean isLibrary) {
    super(project, instantiator, androidBuilder, sdkHandler, buildTypes, productFlavors,
            signingConfigs, extraModelInfo, isLibrary);

    getSourceSetsContainer().create(ANDROID_TEST.getPrefix());
    getSourceSetsContainer().create(UNIT_TEST.getPrefix());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:TestedExtension.java

示例10: TestExtension

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public TestExtension(@NonNull ProjectInternal project, @NonNull Instantiator instantiator,
        @NonNull AndroidBuilder androidBuilder, @NonNull SdkHandler sdkHandler,
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs,
        @NonNull ExtraModelInfo extraModelInfo, boolean isLibrary) {
    super(project, instantiator, androidBuilder, sdkHandler, buildTypes, productFlavors,
            signingConfigs, extraModelInfo, isLibrary);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TestExtension.java

示例11: AppExtension

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public AppExtension(@NonNull ProjectInternal project, @NonNull Instantiator instantiator,
        @NonNull AndroidBuilder androidBuilder, @NonNull SdkHandler sdkHandler,
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs,
        @NonNull ExtraModelInfo extraModelInfo, boolean isLibrary) {
    super(project, instantiator, androidBuilder, sdkHandler, buildTypes, productFlavors,
            signingConfigs, extraModelInfo, isLibrary);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AppExtension.java

示例12: LibraryExtension

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public LibraryExtension(@NonNull ProjectInternal project, @NonNull Instantiator instantiator,
        @NonNull AndroidBuilder androidBuilder, @NonNull SdkHandler sdkHandler,
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs,
        @NonNull ExtraModelInfo extraModelInfo, boolean isLibrary) {
    super(project, instantiator, androidBuilder, sdkHandler, buildTypes, productFlavors,
            signingConfigs, extraModelInfo, isLibrary);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:LibraryExtension.java

示例13: createDefaultComponents

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
@Override
public void createDefaultComponents(
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs) {
    // don't call super as we don't want the default app version.
    // must create signing config first so that build type 'debug' can be initialized
    // with the debug signing config.
    signingConfigs.create(BuilderConstants.DEBUG);
    buildTypes.create(BuilderConstants.DEBUG);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:TestVariantFactory.java

示例14: createDefaultComponents

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
@Override
public void createDefaultComponents(
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs) {
    // must create signing config first so that build type 'debug' can be initialized
    // with the debug signing config.
    signingConfigs.create(DEBUG);
    buildTypes.create(DEBUG);
    buildTypes.create(RELEASE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:LibraryVariantFactory.java

示例15: AndroidConfigAdaptor

import org.gradle.api.NamedDomainObjectContainer; //导入依赖的package包/类
public AndroidConfigAdaptor(
        AndroidConfig model,
        NamedDomainObjectContainer<AndroidSourceSet> sourceSetsContainer) {
    this.model = model;
    this.sourceSetsContainer = sourceSetsContainer;
    applyProjectSourceSet();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AndroidConfigAdaptor.java


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