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() . 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
Source File: ProjectBuilderImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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
Source File: ProjectBuilderImpl.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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
Source File: ProjectBuilderImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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
Source File: ProjectBuilderImpl.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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;
}