Java Code Examples for org.gradle.internal.FileUtils

The following examples show how to use org.gradle.internal.FileUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
protected File getOutputFileDir(File sourceFile, File objectFileDir) {
    File outputFile = new CompilerOutputFileNamingScheme()
                            .withObjectFileNameSuffix(objectFileNameSuffix)
                            .withOutputBaseFolder(objectFileDir)
                            .map(sourceFile);
    File outputDirectory = outputFile.getParentFile();
    if (!outputDirectory.exists()) {
        outputDirectory.mkdirs();
    }
    return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
}
 
Example 2
private File getOutputFile(WindowsResourceCompileSpec spec) {

            File outputFile = new CompilerOutputFileNamingScheme()
                    .withObjectFileNameSuffix(".res")
                    .withOutputBaseFolder(spec.getObjectFileDir())
                    .map(inputFile);

            File outputDirectory = outputFile.getParentFile();
            if (!outputDirectory.exists()) {
                outputDirectory.mkdirs();
            }
            return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
        }
 
Example 3
protected File getOutputFileDir(File sourceFile, File objectFileDir) {
    String compactMD5 = HashUtil.createCompactMD5(sourceFile.getAbsolutePath());
    File outputFileDir = new File(objectFileDir, compactMD5);
    if(!outputFileDir.exists()){
        outputFileDir.mkdir();
    }
    File outputFile = new File(outputFileDir, objectFileName);
    return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
}
 
Example 4
private File getOutputFile(WindowsResourceCompileSpec spec) {
    String outputFileName = FilenameUtils.getBaseName(inputFile.getName()) + ".res";
    String compactMD5 = HashUtil.createCompactMD5(inputFile.getAbsolutePath());
    File outputDirectory = new File(spec.getObjectFileDir(), compactMD5);
    if(!outputDirectory.exists()){
        outputDirectory.mkdir();
    }
    File outputFile = new File(outputDirectory, outputFileName);
    return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
}
 
Example 5
protected File getOutputFileDir(File sourceFile, File objectFileDir) {
    File outputFile = new CompilerOutputFileNamingScheme()
                            .withObjectFileNameSuffix(objectFileNameSuffix)
                            .withOutputBaseFolder(objectFileDir)
                            .map(sourceFile);
    File outputDirectory = outputFile.getParentFile();
    if (!outputDirectory.exists()) {
        outputDirectory.mkdirs();
    }
    return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
}
 
Example 6
private File getOutputFile(WindowsResourceCompileSpec spec) {

            File outputFile = new CompilerOutputFileNamingScheme()
                    .withObjectFileNameSuffix(".res")
                    .withOutputBaseFolder(spec.getObjectFileDir())
                    .map(inputFile);

            File outputDirectory = outputFile.getParentFile();
            if (!outputDirectory.exists()) {
                outputDirectory.mkdirs();
            }
            return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
        }
 
Example 7
protected File getOutputFileDir(File sourceFile, File objectFileDir) {
    String compactMD5 = HashUtil.createCompactMD5(sourceFile.getAbsolutePath());
    File outputFileDir = new File(objectFileDir, compactMD5);
    if(!outputFileDir.exists()){
        outputFileDir.mkdir();
    }
    File outputFile = new File(outputFileDir, objectFileName);
    return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
}
 
Example 8
private File getOutputFile(WindowsResourceCompileSpec spec) {
    String outputFileName = FilenameUtils.getBaseName(inputFile.getName()) + ".res";
    String compactMD5 = HashUtil.createCompactMD5(inputFile.getAbsolutePath());
    File outputDirectory = new File(spec.getObjectFileDir(), compactMD5);
    if(!outputDirectory.exists()){
        outputDirectory.mkdir();
    }
    File outputFile = new File(outputDirectory, outputFileName);
    return windowsPathLengthLimitation ? FileUtils.assertInWindowsPathLengthLimitation(outputFile) : outputFile;
}
 
Example 9
@Override
public String getBaseUrl() {
    return String.format("classes/%s.html", FileUtils.toSafeFileName(name));
}
 
Example 10
private String getReportFileName(TestClassResult result) {
    return "TEST-" + FileUtils.toSafeFileName(result.getClassName()) + ".xml";
}
 
Example 11
@Override
public String getBaseUrl() {
    return String.format("classes/%s.html", FileUtils.toSafeFileName(name));
}
 
Example 12
private String getReportFileName(TestClassResult result) {
    return "TEST-" + FileUtils.toSafeFileName(result.getClassName()) + ".xml";
}
 
Example 13
@Override
public String getBaseUrl() {
    return String.format("classes/%s.html", FileUtils.toSafeFileName(name));
}
 
Example 14
private String getReportFileName(TestClassResult result) {
    return "TEST-" + FileUtils.toSafeFileName(result.getClassName()) + ".xml";
}
 
Example 15
@Override
public String getBaseUrl() {
    return String.format("classes/%s.html", FileUtils.toSafeFileName(name));
}
 
Example 16
private String getReportFileName(TestClassResult result) {
    return "TEST-" + FileUtils.toSafeFileName(result.getClassName()) + ".xml";
}