• Dico

    Dico

    3 years ago
    I would like to make a multiplatform project with only jvm targets. However, the common source set can't access the JRE classes. I tried adding them as a dependency like so:
    implementation(fileTree("$directoryJre/lib/ext"))
    which makes them show up in the gradle view of intellij, but it does not work. The same goes for other java dependencies I add in the common source set. It would be useful to be able to configure a multiplatform project as jvm-only, allowing java dependencies as well as the JRE to be accessed from the common source. I have a few use cases where the ability to use expect/actual declarations would be invaluable, and I'm sure that there would be more: • I have a project that I would like to implement as an external process or injected dll • Any project targeting one of a set of libraries per build, for example, minecraft server plugins that support multiple server platforms (bukkit, nukkit, sponge, glowstone) If something like this is already possible using some workaround, please do let me know.
    Dico
    kpgalligan
    +1
    8 replies
    Copy to Clipboard
  • b

    basher

    3 years ago
    Has anyone shipped an MPP project on iOS? If so, how are you dealing with no dSYMs for the release framework? 😅
    b
    kpgalligan
    7 replies
    Copy to Clipboard
  • hallvard

    hallvard

    3 years ago
    Oh, I found a solution here: https://discuss.kotlinlang.org/t/problem-with-lazy-loading-and-lack-of-a-backing-field/1415. A little... special, the java interop here, but I guess that's the cost of automated handling of backing fields etc. Anyway, it now works, and that's the important part. Thanks, Cedric!
    hallvard
    Dico
    4 replies
    Copy to Clipboard
  • c

    Cyrille QUÉMIN

    3 years ago
    Hi guys, I am using Kotlin multiplatform 1.3.11 and I am working on a android/iOS library. I have trouble with some of the crypto related functions on iOS. So far I manage to successfully use CCCrypt, CCCryptorCreate, CCCryptorUpdate and CCCryptorFinal. However when I try to use asymmetric encryption method such as SecKeyCreateRandomKey I got a signal 11: Segmentation fault. Worth mentioning that I am testing those methods via unit test witch launch an iOS simulator without UI. I read that some other people had issue with encryption method and Kotlin native so maybe these are related?? If any of you has an idea ? And also how is it best to debug ? Can I debug Kotlin native code? How can I have a stacktrace or something that will help me identifying the root cause. I know for sure that the call that fails is SecKeyCreateRandomKey regardless of all the parameters variations i tried I always get a segmentation fault.
    c
    1 replies
    Copy to Clipboard
  • Dico

    Dico

    3 years ago
    I have a multiplatform project targeting jvm, android and ios. I have a buildSrc module with
    kotlin-gradle-plugin:1.3.11
    as a dependency. The same version of the plugin is applied to the whole project. When building, I get the following error:
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':client-shared:compileKotlinJvm'.
    
    Caused by: java.lang.NoSuchMethodError: org.jetbrains.kotlin.incremental.BuildUtilKt.makeModuleFile(Ljava/lang/String;ZLjava/io/File;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/io/File;
    	at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvmCompiler(GradleKotlinCompilerRunner.kt:102)
    	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$kotlin_gradle_plugin(Tasks.kt:405)
    	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$kotlin_gradle_plugin(Tasks.kt:309)
    	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:270)
    <12 hidden>
    	... 29 more
    Dico
    bdeg
    4 replies
    Copy to Clipboard
  • r

    Robert

    3 years ago
    Is there a modInverse available in Kotlin (mpp)?
    r
    Dominaezzz
    2 replies
    Copy to Clipboard
  • h

    Hauke Radtki

    3 years ago
    Is there a up-to-date resource that I can read regarding publishing a MPP library? I only get as far as publishing to mavenLocal
    h
    orangy
    +1
    17 replies
    Copy to Clipboard
  • r

    Rak

    3 years ago
    and how difficult?
    r
    Dominaezzz
    2 replies
    Copy to Clipboard
  • alexfacciorusso

    alexfacciorusso

    3 years ago
    Hi guys. I’m writing a multiplatform app with network calls and coroutines. I have basically two Coroutine Dispatchers, one for main and one for i/o operations. On Android, these are defined as Dispatchers.Main and Dispatchers.IO. On iOS, though, I’ve implemented what I’ve seen on many projects/tutorials online: a custom
    dispatch_queue
    dispatcher that takes a native dispatch queue and calls a
    dispatch_async()
    on it. The tutorials I’ve seen, though, they use the same dispatch queue for running every operation (the main dispatch queue). Indeed if I try to create a new dispatch queue for network (a new thread), it says it can’t run stuff in it because it can’t use a “non blocked or shared object” on a different thread. Questions:1. Is there a way to create two threads for two dispatchers and use them with coroutines in Kotlin MPP (I think not, since I’m seeing that there’s an issue filed for it); 2. How bad is running network and UI in the same thread but asyncronously? 3. Are there some limitations for this?
    alexfacciorusso
    kpgalligan
    12 replies
    Copy to Clipboard
  • t

    thevery

    3 years ago
    Since there is no ETA for JB libs update for 4.10, maybe someone is retrofitting sqldelight 1.0.0 for 4.7?
    t
    kpgalligan
    +2
    6 replies
    Copy to Clipboard