Skip to content

Install ​

Add the editor. Add highlight only if you want SweetLine syntax coloring.

kotlin
implementation("io.github.lumkit:sweeteditor-compose:0.1.7")
implementation("io.github.lumkit:sweetline-compose:0.1.7") // optional

Gradle resolves the platform variant for each coordinate.

Host versions ​

The host must match this set (or a newer compatible pair):

PieceVersion
Compose Multiplatform1.12.1
Kotlin2.4.20
Android compileSdk37

targetSdk and minSdk can stay lower. minSdk for the library is 24.

Older Compose Gradle plugins ship an older Skiko that is missing Paragraph.nGetUnresolvedCodepointsCount. JS and Wasm crash at runtime.

What you get per platform ​

sweeteditor-compose ​

PlatformArtifactNative payload
Androidsweeteditor-compose-android (transitive …-android-jni)libsweeteditor.so + libsweeteditor_compose.so per ABI
Desktop JVMsweeteditor-compose-jvm/native/<os>-<arch>/ Core + compose JNI
iOSiosarm64 / iosSimulatorArm64cinterop statically links libsweeteditor.a
Webjs / wasm-jsC ABI module under Compose resources

sweetline-compose ​

PlatformArtifactNative payload
Androidsweetline-compose-android (transitive …-android-jni)libsweetline.so + libsweetline_compose.so + syntax JSON
Desktop JVMsweetline-compose-jvm/native/<os>-<arch>/ Core + compose JNI
iOSiosarm64 / iosSimulatorArm64cinterop statically links libsweetline.a
Webjs / wasm-jsC ABI + loader under Compose files/

You do not add an XCFramework, JNA, extra native link flags, or -liconv.

Repositories ​

Maven Central. Snapshots (if you use a -SNAPSHOT version) go to the Central Portal snapshots repository.

Next ​

Hello World · SweetLine highlight