add minimal go setup
This commit is contained in:
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user