GolemComputers/rust/build.gradle.kts

20 lines
493 B
Plaintext

val task = tasks.register<Exec>("default") {
commandLine("cargo", "build", "--release")
val library = System.mapLibraryName("golem_computers")
val libraryPath = "$workingDir/target/release/$library"
outputs.file(libraryPath)
inputs.dir("$workingDir/src")
doLast {
if (!file(libraryPath).exists()) {
throw GradleException("the library wasn't properly build! expected $libraryPath")
}
}
}
configurations {
create("default") {
}
}
artifacts.add("default", task)