本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
});
}
示例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;
}