gradle: Create bootstrap dir before writing

This commit is contained in:
Owain van Brakel
2019-11-02 05:43:12 +01:00
parent bb179f07c7
commit 529a10f786

View File

@@ -96,6 +96,11 @@ open class BootstrapTask : DefaultTask() {
"artifacts" to getArtifacts()
).toString()
project.file("${project.buildDir}/bootstrap/bootstrap-${type}.json").writeText(json)
val bootstrapDir = File("${project.buildDir}/bootstrap")
bootstrapDir.mkdirs()
File(bootstrapDir, "bootstrap-${type}.json").printWriter().use { out ->
out.println(json)
}
}
}