1
0
forked from SPC/spc-site

Fix task outputs for build date

This commit is contained in:
Alexander Nozik 2022-05-26 22:57:55 +03:00
parent 1c3fb97826
commit 72bd67797c
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -58,9 +58,11 @@ sourceSets {
}
val writeBuildDate: Task by tasks.creating {
doFirst {
doLast {
val deployDate = LocalDateTime.now()
project.buildDir.resolve("resources/main/buildDate").writeText(deployDate.toString())
val file = File(project.buildDir, "resources/main/buildDate")
file.parentFile.mkdirs()
file.writeText(deployDate.toString())
}
outputs.file("resources/main/buildDate")
}