本文整理汇总了Java中org.gradle.internal.Actions.composite方法的典型用法代码示例。如果您正苦于以下问题:Java Actions.composite方法的具体用法?Java Actions.composite怎么用?Java Actions.composite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gradle.internal.Actions
的用法示例。
在下文中一共展示了Actions.composite方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBinaries
import org.gradle.internal.Actions; //导入方法依赖的package包/类
@Mutate
public void createBinaries(BinaryContainer binaries, PlatformContainer platforms, BinaryNamingSchemeBuilder namingSchemeBuilder,
NamedDomainObjectCollection<JvmLibrarySpec> libraries, @Path("buildDir") File buildDir, ServiceRegistry serviceRegistry, JavaToolChainRegistry toolChains) {
Instantiator instantiator = serviceRegistry.get(Instantiator.class);
List<Action<? super JarBinarySpec>> actions = Lists.newArrayList();
actions.add(new JarBinarySpecInitializer(buildDir));
actions.add(new MarkBinariesBuildable());
Action<JarBinarySpec> initAction = Actions.composite(actions);
JarBinariesFactory factory = new DefaultJarBinariesFactory(instantiator, initAction);
Action<JvmLibrarySpec> createBinariesAction =
new JvmLibrarySpecInitializer(factory, namingSchemeBuilder, toolChains, platforms);
for (JvmLibrarySpec jvmLibrary : libraries) {
createBinariesAction.execute(jvmLibrary);
binaries.addAll(jvmLibrary.getBinaries());
}
}
示例2: createNativeBinaries
import org.gradle.internal.Actions; //导入方法依赖的package包/类
@Mutate
public void createNativeBinaries(BinaryContainer binaries, NamedDomainObjectSet<NativeComponentSpec> nativeComponents,
LanguageRegistry languages, NativeToolChainRegistryInternal toolChains,
PlatformContainer platforms, BuildTypeContainer buildTypes, FlavorContainer flavors,
ServiceRegistry serviceRegistry, @Path("buildDir") File buildDir) {
Instantiator instantiator = serviceRegistry.get(Instantiator.class);
NativeDependencyResolver resolver = serviceRegistry.get(NativeDependencyResolver.class);
Action<NativeBinarySpec> configureBinaryAction = new NativeBinarySpecInitializer(buildDir);
Action<NativeBinarySpec> setToolsAction = new ToolSettingNativeBinaryInitializer(languages);
Action<NativeBinarySpec> setDefaultTargetsAction = new ToolSettingNativeBinaryInitializer(languages);
@SuppressWarnings("unchecked") Action<NativeBinarySpec> initAction = Actions.composite(configureBinaryAction, setToolsAction, new MarkBinariesBuildable());
NativeBinariesFactory factory = new DefaultNativeBinariesFactory(instantiator, initAction, resolver);
BinaryNamingSchemeBuilder namingSchemeBuilder = new DefaultBinaryNamingSchemeBuilder();
Action<NativeComponentSpec> createBinariesAction =
new NativeComponentSpecInitializer(factory, namingSchemeBuilder, toolChains, platforms, buildTypes, flavors);
for (NativeComponentSpec component : nativeComponents) {
createBinariesAction.execute(component);
binaries.addAll(component.getBinaries());
}
}
示例3: getDependencySubstitutionRule
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<DependencySubstitution> getDependencySubstitutionRule() {
Collection<Action<DependencySubstitution>> allRules = flattenElements(
new ModuleForcingResolveRule(forcedModules),
dependencySubstitutions.getRuleAction(),
globalDependencySubstitutionRules.getRuleAction());
return Actions.composite(allRules);
}
示例4: getRuleAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
@Override
public Action<DependencySubstitution> getRuleAction() {
return Actions.composite(CollectionUtils.collect(ruleProviders, new Transformer<Action<? super DependencySubstitution>, DependencySubstitutionRules>() {
@Override
public Action<? super DependencySubstitution> transform(DependencySubstitutionRules rule) {
return rule.getRuleAction();
}
}));
}
示例5: getRuleAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
@Override
public Action<DependencySubstitution> getRuleAction() {
List<Action<DependencySubstitution>> allActions = Lists.newArrayList();
if (!provided.isEmpty()) {
allActions.add(new CompositeBuildDependencySubstitutions(provided));
}
allActions.addAll(substitutionRules);
return Actions.composite(allActions);
}
示例6: createProjectEvaluator
import org.gradle.internal.Actions; //导入方法依赖的package包/类
protected ProjectEvaluator createProjectEvaluator() {
ConfigureActionsProjectEvaluator withActionsEvaluator = new ConfigureActionsProjectEvaluator(
new PluginsProjectConfigureActions(get(ClassLoaderRegistry.class).getPluginsClassLoader()),
new BuildScriptProcessor(get(ScriptPluginFactory.class)),
new DelayedConfigurationActions()
);
Action<? super ProjectInternal> projectFinalizer = Actions.composite(new TaskModelRealizingConfigurationAction(),
new ModelRegistryValidatingConfigurationAction());
return new LifecycleProjectEvaluator(withActionsEvaluator, projectFinalizer);
}
示例7: getArgAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<List<String>> getArgAction() {
Action<? super List<String>> platformArgsAction = new Action<List<String>>() {
public void execute(List<String> strings) {
strings.addAll(0, platformArgs);
}
};
return Actions.composite(baseTool.getArgAction(), platformArgsAction);
}
示例8: ConnectionVersion4BackedModelProducer
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public ConnectionVersion4BackedModelProducer(ProtocolToModelAdapter adapter, VersionDetails versionDetails, ModelMapping modelMapping, ConnectionVersion4 delegate) {
super(adapter, versionDetails, modelMapping);
this.delegate = delegate;
mapper = Actions.composite(
new PropertyHandlerFactory().forVersion(versionDetails),
new TaskPropertyHandlerFactory().forVersion(versionDetails));
}
示例9: getRuleAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
@Override
public Action<DependencySubstitution> getRuleAction() {
return Actions.composite(substitutionRules);
}
示例10: getArgAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
@Override
public Action<List<String>> getArgAction() {
return Actions.composite(argActions);
}
示例11: getDependencyResolveRule
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<DependencyResolveDetailsInternal> getDependencyResolveRule() {
Collection allRules = flattenElements(new ModuleForcingResolveRule(forcedModules), dependencyResolveRules);
return Actions.composite(allRules);
}
示例12: getArgAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<List<String>> getArgAction() {
return Actions.composite(argActions);
}