Java Code Examples for org.gradle.api.artifacts.ConfigurationContainer#create()
The following examples show how to use
org.gradle.api.artifacts.ConfigurationContainer#create() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CppPublicMacrosPlugin.java From native-samples with Apache License 2.0 | 6 votes |
private static Configuration createConfiguration(ConfigurationContainer configurations, ObjectFactory objectFactory) { return configurations.create("cppPublicMacros", new Action<Configuration>() { @Override public void execute(Configuration configuration) { configurations.all(new Action<Configuration>() { @Override public void execute(Configuration it) { if (it.getName().toLowerCase().endsWith("implementation")) { configuration.extendsFrom(it); } } }); configuration.setCanBeConsumed(false); configuration.setCanBeResolved(true); configuration.getAttributes().attribute(Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, "cpp-public-macros")); } }); }
Example 2
Source File: CppPublicMacrosPlugin.java From native-samples with Apache License 2.0 | 6 votes |
private static Configuration createElementsConfiguration(ConfigurationContainer configurations, ObjectFactory objectFactory) { return configurations.create("cppPublicMacrosElements", new Action<Configuration>() { @Override public void execute(Configuration configuration) { configurations.all(new Action<Configuration>() { @Override public void execute(Configuration it) { if (it.getName().toLowerCase().endsWith("implementation")) { configuration.extendsFrom(it); } } }); configuration.setCanBeConsumed(true); configuration.setCanBeResolved(false); configuration.getAttributes().attribute(Usage.USAGE_ATTRIBUTE, objectFactory.named(Usage.class, "cpp-public-macros")); } }); }
Example 3
Source File: DefaultScriptHandler.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 4
Source File: AbstractScriptHandler.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 5
Source File: DefaultScriptHandler.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 6
Source File: AbstractScriptHandler.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 7
Source File: AndroidConfigHelper.java From javaide with GNU General Public License v3.0 | 5 votes |
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); }
Example 8
Source File: BaseExtension.java From javaide with GNU General Public License v3.0 | 5 votes |
protected void createConfiguration( @NonNull ConfigurationContainer configurations, @NonNull String configurationName, @NonNull String configurationDescription) { logger.info("Creating configuration {}", configurationName); Configuration configuration = configurations.findByName(configurationName); if (configuration == null) { configuration = configurations.create(configurationName); } configuration.setVisible(false); configuration.setDescription(configurationDescription); }
Example 9
Source File: DefaultScriptHandler.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 10
Source File: AbstractScriptHandler.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 11
Source File: DefaultScriptHandler.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
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); }
Example 12
Source File: AbstractScriptHandler.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
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); }