diff --git a/.idea/misc.xml b/.idea/misc.xml index d5d5cd9..b861657 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,9 @@ + + + diff --git a/build.gradle.kts b/build.gradle.kts index 4faed3a..49c3f3d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") } \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ba901e9 --- /dev/null +++ b/go.mod @@ -0,0 +1,4 @@ +module rosa.moe/planterette + +go 1.24.7 + diff --git a/src/main/go/main.go b/src/main/go/main.go new file mode 100644 index 0000000..7905807 --- /dev/null +++ b/src/main/go/main.go @@ -0,0 +1,5 @@ +package main + +func main() { + +} diff --git a/src/main/go/main_test.go b/src/main/go/main_test.go new file mode 100644 index 0000000..8dbbdc2 --- /dev/null +++ b/src/main/go/main_test.go @@ -0,0 +1,10 @@ +package main + +import ( + "testing" + _ "testing" +) + +func TestHelloWorld(t *testing.T) { + +}