本文整理汇总了Java中org.gradle.api.tasks.SkipWhenEmpty类的典型用法代码示例。如果您正苦于以下问题:Java SkipWhenEmpty类的具体用法?Java SkipWhenEmpty怎么用?Java SkipWhenEmpty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SkipWhenEmpty类属于org.gradle.api.tasks包,在下文中一共展示了SkipWhenEmpty类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: attachActions
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
public void attachActions(final TaskPropertyActionContext context) {
context.setValidationAction(new ValidationAction() {
@Override
public void validate(String propertyName, Object value, Collection<String> messages) {
AbstractInputPropertyAnnotationHandler.this.validate(propertyName, value, messages);
}
});
context.setConfigureAction(new UpdateAction() {
public void update(TaskInternal task, Callable<Object> futureValue) {
final TaskInputFilePropertyBuilder propertyBuilder = createPropertyBuilder(context, task, futureValue);
propertyBuilder
.withPropertyName(context.getName())
.withPathSensitivity(getPathSensitivity(context))
.skipWhenEmpty(context.isAnnotationPresent(SkipWhenEmpty.class))
.optional(context.isOptional());
handleOrderSensitive(propertyBuilder, context);
}
});
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:20,代码来源:AbstractInputPropertyAnnotationHandler.java
示例2: getClassesDir
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/**
* The directory containing the classes to be analyzed.
*/
@PathSensitive(PathSensitivity.RELATIVE)
@InputDirectory
@SkipWhenEmpty
public File getClassesDir() {
return classesDir;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:JDepend.java
示例3: getClasses
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/**
* The classes to be analyzed.
*/
@SkipWhenEmpty
@PathSensitive(PathSensitivity.RELATIVE)
@InputFiles
public FileCollection getClasses() {
return classes;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:FindBugs.java
示例4: getSource
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/**
* Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.
*
* @return The source.
*/
// This method is here as the Gradle DSL generation can't handle properties with setters and getters in different classes.
@InputFiles
@SkipWhenEmpty
public FileTree getSource() {
return super.getSource();
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:AntlrTask.java
示例5: getClassesDir
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/**
* The directory containing the classes to validate.
*/
@PathSensitive(PathSensitivity.RELATIVE)
@InputDirectory
@SkipWhenEmpty
public File getClassesDir() {
return classesDir;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:ValidateTaskProperties.java
示例6: getTestResultDirs
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/**
* Returns the set of binary test results to include in the report.
*/
@InputFiles @SkipWhenEmpty
public FileCollection getTestResultDirs() {
UnionFileCollection dirs = new UnionFileCollection();
for (Object result : results) {
addTo(result, dirs);
}
return dirs;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:TestReport.java
示例7: attachActions
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
public void attachActions(PropertyActionContext context) {
final boolean isSourceFiles = context.getTarget().getAnnotation(SkipWhenEmpty.class) != null;
context.setConfigureAction(new UpdateAction() {
public void update(Task task, Callable<Object> futureValue) {
if (isSourceFiles) {
task.getInputs().source(futureValue);
} else {
task.getInputs().files(futureValue);
}
}
});
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:13,代码来源:InputFilesPropertyAnnotationHandler.java
示例8: attachActions
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
public void attachActions(PropertyActionContext context) {
context.setValidationAction(inputDirValidation);
final boolean isSourceDir = context.getTarget().getAnnotation(SkipWhenEmpty.class) != null;
context.setConfigureAction(new UpdateAction() {
public void update(Task task, Callable<Object> futureValue) {
if (isSourceDir) {
task.getInputs().sourceDir(futureValue);
} else {
task.getInputs().dir(futureValue);
}
}
});
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:14,代码来源:InputDirectoryPropertyAnnotationHandler.java
示例9: getInputDirectory
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
@InputDirectory
@SkipWhenEmpty
@PathSensitive(PathSensitivity.NONE)
@Optional
public File getInputDirectory() {
if (!inputDirectory.exists()) {
return null;
} else {
return inputDirectory;
}
}
开发者ID:johnmartel,项目名称:javaccPlugin,代码行数:12,代码来源:AbstractJavaccTask.java
示例10: getSource
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/**
* The source object files to be passed to the archiver.
*/
@InputFiles
@SkipWhenEmpty
public FileCollection getSource() {
return source;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:CreateStaticLibrary.java
示例11: getSource
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
@InputFiles
@SkipWhenEmpty
public FileCollection getSource() {
return source;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:6,代码来源:Assemble.java
示例12: getClassFiles
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
/** Returns the classes to check. */
@InputFiles
@SkipWhenEmpty
public FileTree getClassFiles() {
return getClassesDirs().getAsFileTree().matching(getPatternSet());
}
开发者ID:policeman-tools,项目名称:forbidden-apis,代码行数:7,代码来源:CheckForbiddenApis.java
示例13: getResults
import org.gradle.api.tasks.SkipWhenEmpty; //导入依赖的package包/类
@InputDirectory
@SkipWhenEmpty
@PathSensitive( PathSensitivity.NONE )
public File getResults() {
return results;
}
开发者ID:TNG,项目名称:JGiven,代码行数:7,代码来源:JGivenReportTask.java
注:本文中的org.gradle.api.tasks.SkipWhenEmpty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论