Alexander Stark04/09/2018, 10:45 AM
olonho04/09/2018, 11:44 AM
DSL verb in Gradle, in Kotlin/JVM it is way harder, you need to produce dynamic library with
and manually convert object arguments. For Kotlin/JS it is never tried, but likely using N-API (https://nodejs.org/api/addons.html) it could be done in the way similar to Kotlin/JVM.
Alexander Stark04/09/2018, 1:04 PM
olonho04/09/2018, 1:21 PM
on iOS, libcurl on Linux)
Alexander Stark04/09/2018, 1:24 PM
Sam04/09/2018, 2:07 PM
gildor04/09/2018, 2:21 PM
I want to use this lib in my pure kotlin moduleCommon module cannot work without platform, on compile time common module just compiled to target platform code, so only platform independent code can work everywhere (the code that you can write in common module). libcure is obviously native only dependency. You just cannot implement http client completely module independent, you need some platfrom specific part that work at least with sockets (but usually you want to use some more high level abstraction). Of course you can compile libcurl and use it on iOS and Android as native dependency, but you need also JNI for JVM and ObjC glue code for Swift to use native lib, so I don’t think this is good solution, actually almost nobody uses such approach for pure Android/iOS apps without big native part But I agree, that everyone needs multiplatform Kotlin HTTP client library for multiplatfrom client and would be nice to have one, hope ktor http-client will be released as separate http library for multiplatform kotlin.