Skip to content

feat: Add a Kotlin harness - #9

Merged
Zaimwa9 merged 1 commit into
mainfrom
harness/kotlin
Oct 21, 2026
Merged

Zaimwa9 merged 1 commit into
mainfrom
harness/kotlin

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Adds a Kotlin harness, so flagsmith-kotlin-android-client can run the spec, and adds it to the compatibility matrix.

  • Harness: harness/kotlin/Harness.kt ports the Java harness. It maps step markers in sdk-spec/steps.kt to top-level functions and invokes them by reflection on the file facade class (StepsKt). Arguments are converted with Gson, which the Android SDK already depends on, with integers kept as Long. The README covers the Dockerfile, the steps-file conventions and running it locally.
  • Why not the Java harness: the Android SDK's API is callback-based and returns kotlin.Result, which Java code can't unwrap without reflection. A Kotlin steps file is also the usage example Android developers would expect.
  • Matrix: adds an android entry using feat/sdk-spec, like the other entries. Its steps file is in ci: Run the Flagsmith SDK behavioural spec flagsmith-kotlin-android-client#89, which is pinned to this branch's head until it's tagged.

The Android SDK is a client-side SDK. Like the JS client, it passes with the server-side key the runner provides.

@Zaimwa9
Zaimwa9 marked this pull request as ready for review October 21, 2026 15:38
@Zaimwa9

Zaimwa9 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@themis-blindfold review

@Zaimwa9
Zaimwa9 merged commit 894455d into main Oct 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants