Test harness only. Cards, events and answers, games (replayed with the games engine), photo stories with edits and take-downs, stickers and directory shares, all built with the engine's own encoders. The bot polls, logs every envelope it opens, and runs commands dropped in a folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.4 KiB
Kotlin
39 lines
1.4 KiB
Kotlin
// The Kotlin half of the cross-engine interop harness.
|
|
//
|
|
// Deliberately a separate module rather than a test source set in `:engine`:
|
|
// it depends on a JSON library and on the `application` plugin, and neither
|
|
// belongs anywhere near the shipped protocol code. The engine's own
|
|
// dependency-free build is worth protecting.
|
|
plugins {
|
|
kotlin("jvm")
|
|
application
|
|
}
|
|
|
|
repositories { mavenCentral() }
|
|
|
|
dependencies {
|
|
implementation(project(":engine"))
|
|
implementation(project(":client"))
|
|
// The shell peer replays game logs with the app's own rules engine.
|
|
implementation(project(":games"))
|
|
implementation("org.json:json:20240303")
|
|
}
|
|
|
|
application {
|
|
mainClass.set("io.flamenet.interop.MainKt")
|
|
}
|
|
|
|
// A second entry point: a Flamenet account you can drive from a shell, used to
|
|
// put a real correspondent on the other end of the app.
|
|
tasks.register<JavaExec>("peer") {
|
|
group = "verification"
|
|
mainClass.set("io.flamenet.interop.Peer")
|
|
classpath = sourceSets["main"].runtimeClasspath
|
|
// `-Pargs="state.json create https://relay1.flamenet.io"`
|
|
doFirst { args((project.findProperty("args") as String? ?: "").split(" ").filter { it.isNotEmpty() }) }
|
|
}
|
|
|
|
// No `jvmTarget` pin here, unlike `:engine`. This never runs on Android, so
|
|
// bytecode level 17 buys nothing, and pinning it while `compileJava` follows
|
|
// the local JDK is how the two tasks end up disagreeing and failing the build.
|