mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
* fix debug of Build.kt (do not rename original source file but use temporary folder instead)
This commit is contained in:
parent
14ad4ce733
commit
1455a9a1a2
3 changed files with 14 additions and 2 deletions
|
@ -288,6 +288,18 @@ class KFiles {
|
|||
return it
|
||||
}
|
||||
|
||||
fun createTempBuildFileInTempDirectory(deleteOnExit: Boolean = false) : File =
|
||||
File(createTempDirectory("kobalt", deleteOnExit), Constants.BUILD_FILE_NAME).let {
|
||||
if (deleteOnExit) it.deleteOnExit()
|
||||
return it
|
||||
}
|
||||
|
||||
fun createTempDirectory(prefix : String = "kobalt", deleteOnExit: Boolean = false) : File =
|
||||
Files.createTempDirectory(prefix).let {
|
||||
if (deleteOnExit) it.toFile().deleteOnExit()
|
||||
return it.toFile()
|
||||
}
|
||||
|
||||
fun src(filePath: String): String = KFiles.joinDir(KOBALT_DIR, SRC, filePath)
|
||||
|
||||
fun makeDir(project: Project, suffix: String) : File {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue