add minimal go setup

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

3
.idea/misc.xml generated
View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_24" default="true" project-jdk-name="openjdk-24" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>

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")
}

4
go.mod Normal file
View File

@ -0,0 +1,4 @@
module rosa.moe/planterette
go 1.24.7

5
src/main/go/main.go Normal file
View File

@ -0,0 +1,5 @@
package main
func main() {
}

10
src/main/go/main_test.go Normal file
View File

@ -0,0 +1,10 @@
package main
import (
"testing"
_ "testing"
)
func TestHelloWorld(t *testing.T) {
}