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


Java ConfigurationContainer.create方法代码示例

本文整理汇总了Java中org.gradle.api.artifacts.ConfigurationContainer.create方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationContainer.create方法的具体用法?Java ConfigurationContainer.create怎么用?Java ConfigurationContainer.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.gradle.api.artifacts.ConfigurationContainer的用法示例。


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

示例1: addConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
public Configuration addConfiguration(ConfigurationContainer configurations, final DependencyHandler dependencies, final JsHintExtension extension) {
    Configuration configuration = configurations.create(JsHintExtension.CONFIGURATION_NAME);
    configuration.defaultDependencies(new Action<DependencySet>() {
        @Override
        public void execute(DependencySet configDependencies) {
            String notation = JsHintExtension.DEFAULT_DEPENDENCY_GROUP + ":" + JsHintExtension.DEFAULT_DEPENDENCY_MODULE + ":" + extension.getVersion() + "@js";
            Dependency dependency = dependencies.create(notation);
            configDependencies.add(dependency);
        }
    });
    return configuration;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:JsHintPlugin.java

示例2: addConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
public Configuration addConfiguration(ConfigurationContainer configurations, final DependencyHandler dependencies, final EnvJsExtension extension) {
    Configuration configuration = configurations.create(EnvJsExtension.CONFIGURATION_NAME);
    configuration.defaultDependencies(new Action<DependencySet>() {
        @Override
        public void execute(DependencySet configDependencies) {
            String notation = EnvJsExtension.DEFAULT_DEPENDENCY_GROUP + ":" + EnvJsExtension.DEFAULT_DEPENDENCY_MODULE + ":" + extension.getVersion() + "@js";
            Dependency dependency = dependencies.create(notation);
            configDependencies.add(dependency);
        }

    });
    return configuration;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:EnvJsPlugin.java

示例3: addJsConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
private Configuration addJsConfiguration(ConfigurationContainer configurations, final DependencyHandler dependencies, final CoffeeScriptExtension extension) {
    Configuration configuration = configurations.create(CoffeeScriptExtension.JS_CONFIGURATION_NAME);
    configuration.defaultDependencies(new Action<DependencySet>() {
        @Override
        public void execute(DependencySet configDependencies) {
            String notation = CoffeeScriptExtension.DEFAULT_JS_DEPENDENCY_GROUP + ":" + CoffeeScriptExtension.DEFAULT_JS_DEPENDENCY_MODULE + ":" + extension.getVersion() + "@js";
            Dependency dependency = dependencies.create(notation);
            configDependencies.add(dependency);
        }
    });
    return configuration;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:CoffeeScriptBasePlugin.java

示例4: getDefaultConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
/**
 * Provides the configuration that signature artifacts are added to. Called once during construction.
 */
protected Configuration getDefaultConfiguration() {
    ConfigurationContainer configurations = project.getConfigurations();
    Configuration configuration = configurations.findByName(DEFAULT_CONFIGURATION_NAME);
    return configuration != null
        ? configuration
        : configurations.create(DEFAULT_CONFIGURATION_NAME);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:11,代码来源:SigningExtension.java

示例5: createConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
private static void createConfiguration(@NonNull ConfigurationContainer configurations,
        @NonNull String configurationName, @NonNull String configurationDescription) {
    Configuration configuration = configurations.findByName(configurationName);
    if (configuration == null) {
        configuration = configurations.create(configurationName);
    }

    configuration.setVisible(false);
    configuration.setDescription(configurationDescription);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:BaseComponentModelPlugin.java

示例6: createConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
private static void createConfiguration(
        @NonNull ConfigurationContainer configurations,
        @NonNull String configurationName,
        @NonNull String configurationDescription) {
    Configuration configuration = configurations.findByName(configurationName);
    if (configuration == null) {
        configuration = configurations.create(configurationName);
    }

    // Disable modification to configurations as this causes issues when accessed through the
    // tooling-api.  Check that it works with Studio's ImportProjectAction before re-enabling
    // them.
    //configuration.setVisible(false);
    //configuration.setDescription(configurationDescription);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:AndroidConfigHelper.java

示例7: DefaultScriptHandler

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
public DefaultScriptHandler(
        ScriptSource scriptSource, RepositoryHandler repositoryHandler,
        DependencyHandler dependencyHandler, ConfigurationContainer configContainer,
        Factory<ClassLoader> classLoaderFactory
) {
    this.repositoryHandler = repositoryHandler;
    this.dependencyHandler = dependencyHandler;
    this.scriptSource = scriptSource;
    this.configContainer = configContainer;
    this.classLoaderFactory = classLoaderFactory;
    classpathConfiguration = configContainer.create(CLASSPATH_CONFIGURATION);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:13,代码来源:DefaultScriptHandler.java

示例8: AbstractScriptHandler

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
public AbstractScriptHandler(RepositoryHandler repositoryHandler,
                             DependencyHandler dependencyHandler, ScriptSource scriptSource,
                             ConfigurationContainer configContainer) {
    this.repositoryHandler = repositoryHandler;
    this.dependencyHandler = dependencyHandler;
    this.scriptSource = scriptSource;
    this.configContainer = configContainer;
    classpathConfiguration = configContainer.create(CLASSPATH_CONFIGURATION);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:AbstractScriptHandler.java

示例9: establishGeneralCompileOnlyCfg

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
public void establishGeneralCompileOnlyCfg()
{
    final JavaPluginConvention javaConvention = project.getConvention().getPlugin(JavaPluginConvention.class);
    final SourceSetContainer sourceSets = javaConvention.getSourceSets();
    final ConfigurationContainer configs = project.getConfigurations();

    final Configuration generalCompileOnly = configs.create(GENERAL_COMPILE_ONLY_CONFIG_NAME);

    Arrays.asList(SourceSet.MAIN_SOURCE_SET_NAME, BuildUtil.SONARQUBE_SOURCE_SET_NAME,
        SourceSet.TEST_SOURCE_SET_NAME).forEach((@Nonnull final String pSourceSetName) -> {
        final SourceSet sourceSet = sourceSets.getByName(pSourceSetName);
        configs.getByName(sourceSet.getCompileOnlyConfigurationName()).extendsFrom(generalCompileOnly);
    });
}
 
开发者ID:checkstyle-addons,项目名称:checkstyle-addons,代码行数:15,代码来源:TaskCreator.java

示例10: addClasspathConfiguration

import org.gradle.api.artifacts.ConfigurationContainer; //导入方法依赖的package包/类
private Configuration addClasspathConfiguration(ConfigurationContainer configurations) {
    Configuration configuration = configurations.create(RhinoExtension.CLASSPATH_CONFIGURATION_NAME);
    configuration.setVisible(false);
    configuration.setDescription("The default Rhino classpath");
    return configuration;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:RhinoPlugin.java


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