add all modules, better gradle setup, and elixir for server
This commit is contained in:
15
buildSrc/build.gradle.kts
Normal file
15
buildSrc/build.gradle.kts
Normal file
@@ -0,0 +1,15 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
create("goPlugin") {
|
||||
id = "goPlugin"
|
||||
implementationClass = "moe.rosa.planterette.buildsrc.GoPlugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user