[K/N][perf] Performance project build

* Add build-tools plugin
* Cleanup code
* Add missing methods after the move
This commit is contained in:
Pavel Punegov
2023-02-06 19:39:58 +01:00
committed by Space Team
parent 71eaa43d95
commit c49128aa99
17 changed files with 137 additions and 76 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
cacheRedirectorEnabled=true
bootstrap.kotlin.default.version=1.8.20-dev-5197
bootstrap.kotlin.default.version=1.9.0-dev-877
kotlin.build.gradlePlugin.version=0.0.39
org.gradle.java.installations.fromEnv=\
@@ -293,26 +293,6 @@ fun Task.dependsOnKonanBuildingTask(artifact: String, target: KonanTarget) {
}
//endregion
// Run command line from string.
fun Array<String>.runCommand(
workingDir: File = File("."),
timeoutAmount: Long = 60,
timeoutUnit: TimeUnit = TimeUnit.SECONDS
): String {
return try {
ProcessBuilder(*this)
.directory(workingDir)
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.redirectError(ProcessBuilder.Redirect.PIPE)
.start().apply {
waitFor(timeoutAmount, timeoutUnit)
}.inputStream.bufferedReader().readText()
} catch (e: Exception) {
println("Couldn't run command ${this.joinToString(" ")}")
println(e.stackTrace.joinToString("\n"))
error(e.message!!)
}
}
@JvmOverloads
fun compileSwift(