Java Code Examples for org.gradle.api.internal.file.TemporaryFileProvider#createTemporaryDirectory()

The following examples show how to use org.gradle.api.internal.file.TemporaryFileProvider#createTemporaryDirectory() . 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
public File prepareProjectDir(File projectDir) {
    if (projectDir == null) {
        TemporaryFileProvider temporaryFileProvider = new TmpDirTemporaryFileProvider();
        projectDir = temporaryFileProvider.createTemporaryDirectory("gradle", "projectDir");
        // TODO deleteOnExit won't clean up non-empty directories (and it leaks memory for long-running processes).
        projectDir.deleteOnExit();
    } else {
        projectDir = GFileUtils.canonicalise(projectDir);
    }
    return projectDir;
}
 
Example 2
public File prepareProjectDir(File projectDir) {
    if (projectDir == null) {
        TemporaryFileProvider temporaryFileProvider = new TmpDirTemporaryFileProvider();
        projectDir = temporaryFileProvider.createTemporaryDirectory("gradle", "projectDir");
        // TODO deleteOnExit won't clean up non-empty directories (and it leaks memory for long-running processes).
        projectDir.deleteOnExit();
    } else {
        projectDir = GFileUtils.canonicalise(projectDir);
    }
    return projectDir;
}
 
Example 3
public File prepareProjectDir(File projectDir) {
    if (projectDir == null) {
        TemporaryFileProvider temporaryFileProvider = new TmpDirTemporaryFileProvider();
        projectDir = temporaryFileProvider.createTemporaryDirectory("gradle", "projectDir");
        // TODO deleteOnExit won't clean up non-empty directories (and it leaks memory for long-running processes).
        projectDir.deleteOnExit();
    } else {
        projectDir = GFileUtils.canonicalise(projectDir);
    }
    return projectDir;
}
 
Example 4
public File prepareProjectDir(File projectDir) {
    if (projectDir == null) {
        TemporaryFileProvider temporaryFileProvider = new TmpDirTemporaryFileProvider();
        projectDir = temporaryFileProvider.createTemporaryDirectory("gradle", "projectDir");
        // TODO deleteOnExit won't clean up non-empty directories (and it leaks memory for long-running processes).
        projectDir.deleteOnExit();
    } else {
        projectDir = GFileUtils.canonicalise(projectDir);
    }
    return projectDir;
}