.repost schema into an idiomatic Kotlin client: immutable models with a builder DSL, a webhooks.<catalog>.<member>() tree, suspend sends that respect structured concurrency, and a shared runtime that handles retries, idempotency, and delivery reconciliation. It sits on the same framework-neutral runtime as the Java SDK and the TypeScript, Go, and Python SDKs, pinned by a cross-language conformance suite.
The runtime is published to Maven Central under the sh.repost group and is server-side only — it holds a publish credential and must not ship in an Android app or any untrusted client.
The published runtime is version
1.0.18, the Gradle plugin id sh.repost.sdk is 1.0.18 on the Gradle Plugin Portal, and the schema engine is 0.9.0 on Maven Central. Java projects should follow the Java quickstart instead.1
Apply the plugin and BOM
Apply the The plugin adds no transitive HTTP, JSON, or logging libraries — the transport is a source-verified, relocated Apache HttpClient baseline inside the runtime, so it cannot collide with your own dependencies. Only
sh.repost.sdk plugin, import repost-bom so every Repost artifact stays on one version, and depend on repost-client-kotlin. A complete working project lives in the repo under examples/kotlin.build.gradle.kts
settings.gradle.kts
kotlinx-coroutines comes along, for the suspend API.2
Define the schema
repost schema init --language kotlin --output ./src/main/kotlin scaffolds a repost/ directory. Declare your events and a Kotlin generator block:repost/schema.repost
3
Generate the client
The plugin binds
repostGenerate before compileKotlin, so a normal build already has your client. To run generation on its own:Your first send
RepostClient is AutoCloseable, so use { } scopes it; the no-arg constructor reads the credential and endpoint from the environment. main here is a suspend fun. Build a model inline with the DSL, or pass a prebuilt one:
SendResult whose deliveryState is ACCEPTED; any failure throws a RepostException subclass — Reliability covers the full outcome model. close() (via use) returns every owned thread and connection to baseline.
Continue
Code generation
The generator block, the
repostGenerateCheck CI gate, and multi-module builds.Configuration
Credentials, timeouts, retries, and the trailing-lambda config DSL.
Reliability
Idempotency, the five delivery states, and coroutine cancellation.