Open itlancer opened 2 years ago
It's not that hard to keep the main freextension, frecontext and frefunctions as java and use kotlin for everything else in your extension. Kotlin is designed with java interoperability in mind so they work well together. We actually do this in several of our extensions already.
tuarua isn't really a workaround but just a demonstration on how you can use kotlin in an ANE. He does take it to the next level and create utilities for returning / converting freobjects but this is really implementation side of an ANE.
Feature Description
AIR should support native extensions developed using Kotlin for Android platform. Nowadays many Android third-party libraries supports only Kotlin, not Java. Moreover it has more performance and recommended by Google for Android. Even some new Android libraries support only Kotlin: https://developer.android.com/guide/topics/renderscript/migrate#intrinsics
Related issue: https://github.com/airsdk/Adobe-Runtime-Support/issues/1632
Known Workarounds
Use https://github.com/tuarua/FreKotlin-Android-ANE