本文整理匯總了Java中org.gradle.api.artifacts.Configuration.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java Configuration.setVisible方法的具體用法?Java Configuration.setVisible怎麽用?Java Configuration.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.gradle.api.artifacts.Configuration
的用法示例。
在下文中一共展示了Configuration.setVisible方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: defineConfigurationsForSourceSet
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void defineConfigurationsForSourceSet(SourceSet sourceSet, ConfigurationContainer configurations) {
Configuration compileConfiguration = configurations.maybeCreate(sourceSet.getCompileConfigurationName());
compileConfiguration.setVisible(false);
compileConfiguration.setDescription("Dependencies for " + sourceSet + ".");
Configuration runtimeConfiguration = configurations.maybeCreate(sourceSet.getRuntimeConfigurationName());
runtimeConfiguration.setVisible(false);
runtimeConfiguration.extendsFrom(compileConfiguration);
runtimeConfiguration.setDescription("Runtime dependencies for " + sourceSet + ".");
Configuration compileOnlyConfiguration = configurations.maybeCreate(sourceSet.getCompileOnlyConfigurationName());
compileOnlyConfiguration.setVisible(false);
compileOnlyConfiguration.extendsFrom(compileConfiguration);
compileOnlyConfiguration.setDescription("Compile dependencies for " + sourceSet + ".");
Configuration compileClasspathConfiguration = configurations.maybeCreate(sourceSet.getCompileClasspathConfigurationName());
compileClasspathConfiguration.setVisible(false);
compileClasspathConfiguration.extendsFrom(compileOnlyConfiguration);
compileClasspathConfiguration.setDescription("Compile classpath for " + sourceSet + ".");
sourceSet.setCompileClasspath(compileClasspathConfiguration);
sourceSet.setRuntimeClasspath(sourceSet.getOutput().plus(runtimeConfiguration));
}
示例2: createConfigurations
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
protected void createConfigurations() {
Configuration configuration = project.getConfigurations().create(getConfigurationName());
configuration.setVisible(false);
configuration.setTransitive(true);
configuration.setDescription("The " + getToolName() + " libraries to be used for this project.");
// Don't need these things, they're provided by the runtime
configuration.exclude(excludeProperties("ant", "ant"));
configuration.exclude(excludeProperties("org.apache.ant", "ant"));
configuration.exclude(excludeProperties("org.apache.ant", "ant-launcher"));
configuration.exclude(excludeProperties("org.slf4j", "slf4j-api"));
configuration.exclude(excludeProperties("org.slf4j", "jcl-over-slf4j"));
configuration.exclude(excludeProperties("org.slf4j", "log4j-over-slf4j"));
configuration.exclude(excludeProperties("commons-logging", "commons-logging"));
configuration.exclude(excludeProperties("log4j", "log4j"));
}
示例3: addJacocoConfigurations
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
/**
* Creates the configurations used by plugin.
*/
private void addJacocoConfigurations() {
Configuration agentConf = project.getConfigurations().create(AGENT_CONFIGURATION_NAME);
agentConf.setVisible(false);
agentConf.setTransitive(true);
agentConf.setDescription("The Jacoco agent to use to get coverage data.");
Configuration antConf = project.getConfigurations().create(ANT_CONFIGURATION_NAME);
antConf.setVisible(false);
antConf.setTransitive(true);
antConf.setDescription("The Jacoco ant tasks to use to get execute Gradle tasks.");
}
示例4: configureFindBugsConfigurations
import org.gradle.api.artifacts.Configuration; //導入方法依賴的package包/類
private void configureFindBugsConfigurations() {
Configuration configuration = project.getConfigurations().create("findbugsPlugins");
configuration.setVisible(false);
configuration.setTransitive(true);
configuration.setDescription("The FindBugs plugins to be used for this project.");
}
示例5: addClasspathConfiguration
import org.gradle.api.artifacts.Configuration; //導入方法依賴的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;
}