// 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")) 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("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.