use of org.gradle.api.resources.TextResource in project gradle by gradle.
the class CheckstylePlugin method configureTaskConventionMapping.
private void configureTaskConventionMapping(Configuration configuration, Checkstyle task) {
ConventionMapping taskMapping = task.getConventionMapping();
taskMapping.map("checkstyleClasspath", Callables.returning(configuration));
taskMapping.map("config", new Callable<TextResource>() {
@Override
public TextResource call() {
return extension.getConfig();
}
});
taskMapping.map("configProperties", new Callable<Map<String, Object>>() {
@Override
public Map<String, Object> call() {
return extension.getConfigProperties();
}
});
taskMapping.map("ignoreFailures", new Callable<Boolean>() {
@Override
public Boolean call() {
return extension.isIgnoreFailures();
}
});
taskMapping.map("showViolations", new Callable<Boolean>() {
@Override
public Boolean call() {
return extension.isShowViolations();
}
});
taskMapping.map("maxErrors", new Callable<Integer>() {
@Override
public Integer call() {
return extension.getMaxErrors();
}
});
taskMapping.map("maxWarnings", new Callable<Integer>() {
@Override
public Integer call() {
return extension.getMaxWarnings();
}
});
}
use of org.gradle.api.resources.TextResource in project gradle by gradle.
the class CodeNarcPlugin method configureTaskConventionMapping.
private void configureTaskConventionMapping(Configuration configuration, CodeNarc task) {
ConventionMapping taskMapping = task.getConventionMapping();
taskMapping.map("codenarcClasspath", Callables.returning(configuration));
taskMapping.map("config", new Callable<TextResource>() {
@Override
public TextResource call() {
return extension.getConfig();
}
});
taskMapping.map("maxPriority1Violations", new Callable<Integer>() {
@Override
public Integer call() {
return extension.getMaxPriority1Violations();
}
});
taskMapping.map("maxPriority2Violations", new Callable<Integer>() {
@Override
public Integer call() {
return extension.getMaxPriority2Violations();
}
});
taskMapping.map("maxPriority3Violations", new Callable<Integer>() {
@Override
public Integer call() {
return extension.getMaxPriority3Violations();
}
});
taskMapping.map("ignoreFailures", new Callable<Boolean>() {
@Override
public Boolean call() {
return extension.isIgnoreFailures();
}
});
}
use of org.gradle.api.resources.TextResource in project gradle by gradle.
the class FindBugsPlugin method configureTaskConventionMapping.
private void configureTaskConventionMapping(Configuration configuration, FindBugs task) {
ConventionMapping taskMapping = task.getConventionMapping();
taskMapping.map("findbugsClasspath", Callables.returning(configuration));
taskMapping.map("ignoreFailures", new Callable<Boolean>() {
@Override
public Boolean call() {
return extension.isIgnoreFailures();
}
});
taskMapping.map("effort", new Callable<String>() {
@Override
public String call() {
return extension.getEffort();
}
});
taskMapping.map("reportLevel", new Callable<String>() {
@Override
public String call() {
return extension.getReportLevel();
}
});
taskMapping.map("visitors", new Callable<Collection<String>>() {
@Override
public Collection<String> call() {
return extension.getVisitors();
}
});
taskMapping.map("omitVisitors", new Callable<Collection<String>>() {
@Override
public Collection<String> call() {
return extension.getOmitVisitors();
}
});
taskMapping.map("excludeFilterConfig", new Callable<TextResource>() {
@Override
public TextResource call() {
return extension.getExcludeFilterConfig();
}
});
taskMapping.map("includeFilterConfig", new Callable<TextResource>() {
@Override
public TextResource call() {
return extension.getIncludeFilterConfig();
}
});
taskMapping.map("excludeBugsFilterConfig", new Callable<TextResource>() {
@Override
public TextResource call() {
return extension.getExcludeBugsFilterConfig();
}
});
taskMapping.map("extraArgs", new Callable<Collection<String>>() {
@Override
public Collection<String> call() {
return extension.getExtraArgs();
}
});
}
use of org.gradle.api.resources.TextResource in project gradle by gradle.
the class PmdPlugin method configureTaskConventionMapping.
private void configureTaskConventionMapping(Configuration configuration, Pmd task) {
ConventionMapping taskMapping = task.getConventionMapping();
taskMapping.map("pmdClasspath", Callables.returning(configuration));
taskMapping.map("ruleSets", new Callable<List<String>>() {
@Override
public List<String> call() {
return extension.getRuleSets();
}
});
taskMapping.map("ruleSetConfig", new Callable<TextResource>() {
@Override
public TextResource call() {
return extension.getRuleSetConfig();
}
});
taskMapping.map("ruleSetFiles", new Callable<FileCollection>() {
@Override
public FileCollection call() {
return extension.getRuleSetFiles();
}
});
taskMapping.map("ignoreFailures", new Callable<Boolean>() {
@Override
public Boolean call() {
return extension.isIgnoreFailures();
}
});
taskMapping.map("rulePriority", new Callable<Integer>() {
@Override
public Integer call() {
return extension.getRulePriority();
}
});
taskMapping.map("consoleOutput", new Callable<Boolean>() {
@Override
public Boolean call() {
return extension.isConsoleOutput();
}
});
taskMapping.map("targetJdk", new Callable<TargetJdk>() {
@Override
public TargetJdk call() {
return extension.getTargetJdk();
}
});
}
Aggregations