How is your experience with the OutSystems Community?
11
Views
0
Comments
How to config Kotlin compatibility in OutSystems MABS for custom Cordova Plugins
Application Type
Mobile

Hello devs,

We are developing a custom Cordova Android plugin in Kotlin that wraps the Clerk Android SDK (com.clerk:clerk-android-api:1.0.35) for shared session synchronization across sibling OutSystems Native Mobile applications.

My problem :
Simple Java plugins (Echo.java) work instantly and return callbacks to the Webview. When using Kotlin (ClerkPlugin.kt), exec() stays pending without throwing a visible error in JavaScript. Clerk.initialize is dispatched on cordova.activity.runOnUiThread. 

Is there a specific classloader setting or reflection requirement for Kotlin plugin entry points in OutSystems Mobile App Builder?

We would like to get recommendations and best practices from the community regarding Kotlin version compatibility, Gradle plugin configuration, and MAB build engine behavior for custom Kotlin-native plugins.
Any advice or insights from the community would be greatly appreciated! 

Context 
For plugin pls refer this
https://github.com/mohans1136-dev/echo-test-plugin#main  


Plugin & Environment Details

  • GitHub Repository URL:
    https://github.com/mohans1136-dev/echo-test-plugin#main
  • Target OS / Platform: Android (minSdkVersion 28)
  • Kotlin Version: 1.9.20
  • Dependencies:
    • com.clerk:clerk-android-api:1.0.35
    • org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3



Extensibility Configuration (Service Studio)



plugin.xml

build-extras.gradle

Folder Struture

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.