val task = tasks.register("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 built! expected $libraryPath") } } } configurations { create("default") } artifacts.add("default", task)