本文整理汇总了Java中org.gradle.util.ConfigureUtil类的典型用法代码示例。如果您正苦于以下问题:Java ConfigureUtil类的具体用法?Java ConfigureUtil怎么用?Java ConfigureUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConfigureUtil类属于org.gradle.util包,在下文中一共展示了ConfigureUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: add
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public void add(final Class<? extends FilterReader> filterType, final Map<String, ?> properties) {
transformers.add(new Transformer<Reader, Reader>() {
public Reader transform(Reader original) {
try {
Constructor<? extends FilterReader> constructor = filterType.getConstructor(Reader.class);
FilterReader result = constructor.newInstance(original);
if (properties != null) {
ConfigureUtil.configureByMap(properties, result);
}
return result;
} catch (Throwable th) {
throw new InvalidUserDataException("Error - Invalid filter specification for " + filterType.getName(), th);
}
}
});
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:18,代码来源:FilterChain.java
示例2: from
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
@Override
public DefaultManifest from(Object mergePaths, Closure<?> closure) {
DefaultManifestMergeSpec mergeSpec = new DefaultManifestMergeSpec();
mergeSpec.from(mergePaths);
manifestMergeSpecs.add(mergeSpec);
ConfigureUtil.configure(closure, mergeSpec);
return this;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:DefaultManifest.java
示例3: createRepository
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
private RemoteRepository createRepository(Map properties, Closure closure) {
RemoteRepository repository = new MavenRemoteRepository();
ConfigureUtil.configureByMap(properties, repository);
// Should be using ConfigureUtil (with DELEGATE_FIRST strategy), however for backwards compatibility need to use OWNER_FIRST
new ClosureBackedAction<RemoteRepository>(closure, Closure.OWNER_FIRST).execute(repository);
return repository;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:DefaultGroovyMavenDeployer.java
示例4: useTestFramework
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
private TestFramework useTestFramework(TestFramework testFramework, Closure testFrameworkConfigure) {
if (testFramework == null) {
throw new IllegalArgumentException("testFramework is null!");
}
this.testFramework = testFramework;
if (testFrameworkConfigure != null) {
ConfigureUtil.configure(testFrameworkConfigure, this.testFramework.getOptions());
}
return this.testFramework;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:14,代码来源:Test.java
示例5: mode
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
void mode(String name, Closure<?> configuration) {
if (Platform.anySectionNameMatches(name)) { throw new GradleException("Capsule mode cannot be named as platform '" + name + "'."); }
if (JavaVersion.validRepresentation(name)) { throw new GradleException("Capsule mode cannot be named as java version '" + name + "'."); }
ModeManifest modeManifest = new ModeManifest(name);
ConfigureUtil.configure(configuration, modeManifest);
nestedManifests.add(modeManifest);
}
开发者ID:jonas-l,项目名称:gradle-capsule-plugin,代码行数:9,代码来源:RootManifest.java
示例6: _configure
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
@Override
protected void _configure(String name, Object[] params, InvokeMethodResult result) {
if (params.length == 1 && params[0] instanceof Closure) {
result.result(_container.create(name, (Closure) params[0]));
} else if (params.length == 1 && params[0] instanceof Class) {
result.result(_container.create(name, (Class) params[0]));
} else if (params.length == 2 && params[0] instanceof Class && params[1] instanceof Closure){
result.result(_container.create(name, (Class) params[0], ConfigureUtil.configureUsing((Closure) params[1])));
}
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:11,代码来源:PolymorphicDomainObjectContainerConfigureDelegate.java
示例7: DefaultConfigurableFileTree
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public DefaultConfigurableFileTree(Map<String, ?> args, FileResolver resolver, TaskResolver taskResolver, FileCopier fileCopier, DirectoryFileTreeFactory directoryFileTreeFactory) {
this.resolver = resolver;
this.fileCopier = fileCopier;
this.directoryFileTreeFactory = directoryFileTreeFactory;
patternSet = resolver.getPatternSetFactory().create();
buildDependency = new DefaultTaskDependency(taskResolver);
ConfigureUtil.configureByMap(args, this);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:DefaultConfigurableFileTree.java
示例8: copy
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public WorkResult copy(final Closure closure) {
return fileCopier.copy(new Action<CopySpec>() {
public void execute(CopySpec copySpec) {
copySpec.from(DefaultConfigurableFileTree.this);
ConfigureUtil.configure(closure, copySpec);
}
});
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:DefaultConfigurableFileTree.java
示例9: invokeMethod
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
@Override
public void invokeMethod(String name, InvokeMethodResult result, Object... arguments) {
if (isConfigureMethod(name, arguments)) {
T element = getByName(name);
Object lastArgument = arguments[arguments.length - 1];
if (lastArgument instanceof Closure) {
ConfigureUtil.configure((Closure) lastArgument, element);
}
result.result(element);
}
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:AbstractPolymorphicDomainObjectContainer.java
示例10: pluginRepositories
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public void pluginRepositories(Closure config) {
try {
inPluginRepositoriesBlock = true;
ConfigureUtil.configure(config, getPluginRepositorySpec());
} finally {
inPluginRepositoriesBlock = false;
}
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:InitialPassSettingsScript.java
示例11: capsuleManifest
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public RootManifest capsuleManifest(Closure<?> configuration) {
ConfigureUtil.configure(configuration, capsuleManifest);
return this.capsuleManifest;
}
开发者ID:jonas-l,项目名称:gradle-capsule-plugin,代码行数:6,代码来源:Capsule.java
示例12: dependencies
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
@Override
public void dependencies(Closure<?> configureAction) {
ConfigureUtil.configure(configureAction, dependencies);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:DefaultJvmApiSpec.java
示例13: configure
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public void configure(SigningExtension settings, Closure closure) {
ConfigureUtil.configure(closure, new Dsl(settings.getProject(), signatories, factory));
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:PgpSignatoryProvider.java
示例14: whenConfigured
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public DefaultMavenPom whenConfigured(final Closure closure) {
whenConfiguredActions.add(ConfigureUtil.configureUsing(closure));
return this;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:DefaultMavenPom.java
示例15: mavenDeployer
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public GroovyMavenDeployer mavenDeployer(Closure configureClosure) {
return container.addRepository(createMavenDeployer(), DEFAULT_MAVEN_DEPLOYER_NAME, ConfigureUtil.configureUsing(configureClosure));
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultMavenRepositoryHandlerConvention.java
示例16: configure
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
/**
* Executes the given closure against this object.
*/
public SignOperation configure(Closure closure) {
ConfigureUtil.configureSelf(closure, this);
return this;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:SignOperation.java
示例17: mavenInstaller
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public MavenResolver mavenInstaller(Closure configureClosure) {
return container.addRepository(createMavenInstaller(), DEFAULT_MAVEN_INSTALLER_NAME, ConfigureUtil.configureUsing(configureClosure));
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultMavenRepositoryHandlerConvention.java
示例18: releases
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public RepositoryPolicy releases(Map properties) {
RepositoryPolicy policy = new RepositoryPolicy();
ConfigureUtil.configureByMap(properties, policy);
addReleases(policy);
return policy;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:MavenRemoteRepository.java
示例19: snapshots
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
public RepositoryPolicy snapshots(Map properties) {
RepositoryPolicy policy = new RepositoryPolicy();
ConfigureUtil.configureByMap(properties, policy);
addSnapshots(policy);
return policy;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:MavenRemoteRepository.java
示例20: copy
import org.gradle.util.ConfigureUtil; //导入依赖的package包/类
@Override
public WorkResult copy(Closure closure) {
return copy(ConfigureUtil.configureUsing(closure));
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:DefaultScript.java
注:本文中的org.gradle.util.ConfigureUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论