All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.gradle.projectExt.getBuildLockDir.kt Maven / Gradle / Ivy

There is a newer version: 0.11.0-4.3
Show newest version
package godot.gradle.projectExt

import org.gradle.api.Project
import java.io.File

fun Project.getBuildLockDir(): File {
    val name = "${projectDir.name}_buildLockDir"  //keep the same in the Bootstrap class!
    val tmpDir = System.getProperty("java.io.tmpdir")
    val lockDir = File(tmpDir, name)

    return if (lockDir.exists() && lockDir.isDirectory) {
        lockDir
    } else {
        lockDir.delete()
        lockDir.mkdirs()
        lockDir
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy