當前位置: 首頁>>代碼示例>>Java>>正文


Java Configuration.defaultDependencies方法代碼示例

本文整理匯總了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()));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:22,代碼來源:JacocoPlugin.java

示例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"));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:10,代碼來源:JDependPlugin.java

示例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));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:11,代碼來源:PmdPlugin.java

示例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()));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:9,代碼來源:FindBugsPlugin.java

示例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()));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:9,代碼來源:CheckstylePlugin.java

示例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()));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:9,代碼來源:CodeNarcPlugin.java

示例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);
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:9,代碼來源:RhinoPlugin.java

示例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;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:13,代碼來源:JsHintPlugin.java

示例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;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:14,代碼來源:EnvJsPlugin.java

示例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;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:13,代碼來源:CoffeeScriptBasePlugin.java

示例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()));
        }
    });
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:16,代碼來源:JacocoPlugin.java


注:本文中的org.gradle.api.artifacts.Configuration.defaultDependencies方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。