add minimal go setup

This commit is contained in:
mae
2025-10-06 21:49:44 -05:00
parent 21738818d5
commit df5e191582
5 changed files with 44 additions and 0 deletions

View File

@@ -18,7 +18,29 @@ dependencies {
tasks.test {
useJUnitPlatform()
dependsOn(testGo)
}
tasks.classes {
dependsOn(compileGo)
}
kotlin {
jvmToolchain(24)
}
val compileGo = tasks.register("compileGo", Exec::class) {
group = "go"
workingDir(layout.projectDirectory)
commandLine("/usr/bin/go", "build", "-o", "build/go/planterette", "./src/main/go")
}
val testGo = tasks.register("testGo", Exec::class) {
group = "go"
workingDir(layout.projectDirectory)
commandLine("/usr/bin/go", "test", "./src/main/go")
}
val runGo = tasks.register("runGo", Exec::class) {
group = "go"
workingDir(layout.projectDirectory)
commandLine("/usr/bin/go", "run", "./src/main/go")
}