46 lines
		
	
	
		
			1022 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1022 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| plugins {
 | |
|     kotlin("jvm") version "2.2.10"
 | |
|     kotlin("plugin.serialization") version "2.2.20"
 | |
| }
 | |
| 
 | |
| group = "moe.rosa"
 | |
| version = "0.1.0"
 | |
| 
 | |
| repositories {
 | |
|     mavenCentral()
 | |
| }
 | |
| 
 | |
| dependencies {
 | |
|     testImplementation(kotlin("test"))
 | |
|     implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
 | |
|     implementation(kotlin("reflect"))
 | |
| }
 | |
| 
 | |
| 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")
 | |
| } |