本文整理匯總了Java中org.gradle.api.artifacts.Configuration.defaultDependencies方法的典型用法代碼示例。如果您正苦於以下問題:Java Configuration.defaultDependencies方法的具體用法?Java Configuration.defaultDependencies怎麽用?Java Configuration.defaultDependencies使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.gradle.api.artifacts.Configuration
的用法示例。
在下文中一共展示了Configuration.defaultDependencies方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configureTaskClasspathDefaults
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
/**
* Configures the classpath for Jacoco tasks using the 'jacocoAnt' configuration. Uses the version information declared in 'toolVersion' of the Jacoco extension if no dependencies are explicitly
* declared.
*
* @param extension the JacocoPluginExtension
*/
private void configureTaskClasspathDefaults(final JacocoPluginExtension extension) {
final Configuration config = this.project.getConfigurations().getAt(ANT_CONFIGURATION_NAME);
project.getTasks().withType(JacocoBase.class, new Action<JacocoBase>() {
@Override
public void execute(JacocoBase task) {
((IConventionAware) task).getConventionMapping().map("jacocoClasspath", Callables.returning(config));
}
});
config.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
dependencies.add(project.getDependencies().create("org.jacoco:org.jacoco.ant:" + extension.getToolVersion()));
}
});
}
示例2: configureDefaultDependencies
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void configureDefaultDependencies(Configuration configuration) {
configuration.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
dependencies.add(project.getDependencies().create("jdepend:jdepend:" + extension.getToolVersion()));
dependencies.add(project.getDependencies().create("org.apache.ant:ant-jdepend:1.9.6"));
}
});
}
示例3: configureDefaultDependencies
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void configureDefaultDependencies(Configuration configuration) {
configuration.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
VersionNumber version = VersionNumber.parse(extension.getToolVersion());
String dependency = calculateDefaultDependencyNotation(version);
dependencies.add(project.getDependencies().create(dependency));
}
});
}
示例4: configureDefaultDependencies
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void configureDefaultDependencies(Configuration configuration) {
configuration.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
dependencies.add(project.getDependencies().create("com.google.code.findbugs:findbugs:" + extension.getToolVersion()));
}
});
}
示例5: configureDefaultDependencies
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void configureDefaultDependencies(Configuration configuration) {
configuration.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
dependencies.add(project.getDependencies().create("com.puppycrawl.tools:checkstyle:" + extension.getToolVersion()));
}
});
}
示例6: configureDefaultDependencies
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void configureDefaultDependencies(Configuration configuration) {
configuration.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
dependencies.add(project.getDependencies().create("org.codenarc:CodeNarc:" + extension.getToolVersion()));
}
});
}
示例7: configureDefaultRhinoDependency
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
public void configureDefaultRhinoDependency(Configuration configuration, final DependencyHandler dependencyHandler, final RhinoExtension extension) {
configuration.defaultDependencies(new Action<DependencySet>() {
public void execute(DependencySet dependencies) {
Dependency dependency = dependencyHandler.create(RhinoExtension.DEFAULT_RHINO_DEPENDENCY_GROUP + ":" + RhinoExtension.DEFAULT_RHINO_DEPENDENCY_MODULE + ":" + extension.getVersion());
dependencies.add(dependency);
}
});
}
示例8: addConfiguration
import org.gradle.api.artifacts.Configuration; //導入方法依賴的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;
}
示例9: addConfiguration
import org.gradle.api.artifacts.Configuration; //導入方法依賴的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;
}
示例10: addJsConfiguration
import org.gradle.api.artifacts.Configuration; //導入方法依賴的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;
}
示例11: configureAgentDependencies
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
/**
* Configures the agent dependencies using the 'jacocoAnt' configuration. Uses the version declared in 'toolVersion' of the Jacoco extension if no dependencies are explicitly declared.
*
* @param extension the extension that has the tool version to use
*/
private void configureAgentDependencies(JacocoAgentJar jacocoAgentJar, final JacocoPluginExtension extension) {
Configuration config = project.getConfigurations().getAt(AGENT_CONFIGURATION_NAME);
((IConventionAware) jacocoAgentJar).getConventionMapping().map("agentConf", Callables.returning(config));
config.defaultDependencies(new Action<DependencySet>() {
@Override
public void execute(DependencySet dependencies) {
dependencies.add(project.getDependencies().create("org.jacoco:org.jacoco.agent:" + extension.getToolVersion()));
}
});
}