use of org.gradle.api.tasks.OutputDirectory in project android-instrumental-test-runner by Grigory-Rylov.
the class InstrumentationTestTask method getReportsDir.
@OutputDirectory
public File getReportsDir() {
if (reportsDir == null) {
String flavor = instrumentationInfo.getFlavorName() != null ? instrumentationInfo.getFlavorName() : DEFAULT_FLAVOR;
reportsDir = new File(getProject().getBuildDir(), String.format("outputs/reports/androidTest/%s", flavor));
logger.d(TAG, "Reports dir is empty, generate default value {}", reportsDir);
}
return reportsDir;
}
use of org.gradle.api.tasks.OutputDirectory in project zaproxy by zaproxy.
the class DownloadAddOns method parseAddOnsData.
private Set<AddOnDownloadData> parseAddOnsData() throws IOException {
File outputDirectory = getOutputDir().get().getAsFile();
List<String> lines = Files.readAllLines(addOnsData.get().getAsFile().toPath());
return lines.stream().map(String::trim).filter(line -> !(line.isEmpty() || line.startsWith("#"))).map(line -> {
String[] lineData = line.split(" ", 2);
String url = lineData[0];
String hash = lineData[1];
File file = new File(outputDirectory, getFileName(url));
return new AddOnDownloadData(url, hash, file);
}).collect(Collectors.toCollection(HashSet::new));
}
Aggregations