add all modules, better gradle setup, and elixir for server

This commit is contained in:
mae
2025-10-07 19:34:23 -05:00
parent 3efcca8651
commit e58cc0a1a6
40 changed files with 273 additions and 29 deletions

15
buildSrc/build.gradle.kts Normal file
View File

@@ -0,0 +1,15 @@
plugins {
`kotlin-dsl`
}
repositories {
gradlePluginPortal()
}
gradlePlugin {
plugins {
create("goPlugin") {
id = "goPlugin"
implementationClass = "moe.rosa.planterette.buildsrc.GoPlugin"
}
}
}

View File

@@ -0,0 +1,22 @@
package moe.rosa.planterette.buildsrc
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Exec
class GoPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.tasks.register("compileGo", Exec::class.java) {
group = "go"
description = "compile all go source files and output into build directory"
workingDir(project.layout.projectDirectory)
commandLine("go", "build", "-o", "../build/go")
}
project.tasks.register("testGo", Exec::class.java) {
group = "go"
description = "run go test"
workingDir(project.layout.projectDirectory)
commandLine("go", "test")
}
}
}