• Andy Victors

    Andy Victors

    3 years ago
    Does anyone have a working example of using
    ktor
    in MPP environment, specifically on iOS where currently only Main-Thread Dispatcher is offered (https://github.com/Kotlin/kotlinx.coroutines/issues/462)?
    Andy Victors
    Jan Stoltman
    +4
    41 replies
    Copy to Clipboard
  • Jan Stoltman

    Jan Stoltman

    3 years ago
    Hey guys, does anybody know how to make mockk
    any
    matcher match objects of one specific class? I imagine something like this:
    any<MyClass::class>()
    Jan Stoltman
    l
    3 replies
    Copy to Clipboard
  • r

    ribesg

    3 years ago
    Why aren’t
    main
    dependencies added to the corresponding
    test
    sourceSet automatically? I need to duplicate all dependencies defined in
    commonMain
    in
    commonTest
    if I want to use them. Same for
    androidMain
    and
    androidTest
    . I didn’t test it, but I suppose it’s the same for iOS
    r
    gildor
    4 replies
    Copy to Clipboard
  • b

    basher

    3 years ago
    Congrats @kpgalligan on getting the Obj-C/Swift generics improvements merged 🎉 https://github.com/JetBrains/kotlin-native/pull/2850
    b
    s
    +3
    5 replies
    Copy to Clipboard
  • uhe

    uhe

    3 years ago
    I'm having trouble setting up
    kotlinOptions
    in a multiplatform lib project. As per the docs I added this to the
    kotlin
    section in the lib's build.gradle:
    targets.all {
            compilations.all {
                kotlinOptions {
                    suppressWarnings = true // just to see if it's applied
                }
            }
        }
    But it does not work (warnings are still displayed in the IDE). Anybody else having issues with these compiler options? I'm using IntelliJ Idea 2019.1.2 and gradle 5.1.1
    uhe
    a
    3 replies
    Copy to Clipboard
  • Jan Stoltman

    Jan Stoltman

    3 years ago
    Hey guys, I would like to add another (non default) test sourceset/compilation for android and ios to my project. Is there any example of how such a thing can be done? The official documentation is not very helpful
    Jan Stoltman
    a
    2 replies
    Copy to Clipboard
  • o

    o.semen

    3 years ago
    Hi, I’m trying to build iOS project of my MPP but it fails with this error
    > Task :app:cinteropFirebaseIos UP-TO-DATE
    > Task :app:linkDebugFrameworkIos
    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_FIRDatabase", referenced from:
          objc-class-ref in combined.o
    ld: symbol(s) not found for architecture x86_64
    e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
    
    > Task :app:linkDebugFrameworkIos FAILED
    o
    i
    +1
    12 replies
    Copy to Clipboard
  • pablisco

    pablisco

    3 years ago
    Is it possible to do Parameterised tests on Kotlin Multiplatform? The testing documentation is very limited and looking at the source I can’t find anything there
    pablisco
    russhwolf
    +1
    9 replies
    Copy to Clipboard
  • p

    pardom

    3 years ago
    Are
    actual
    implementations restricted to the
    expect
    declaration module?
    p
    h0tk3y
    2 replies
    Copy to Clipboard
  • b

    Benjamin Charais

    3 years ago
    Hello all, I’ve been working on building a multi platform project for Kotlin to support multiple android and ios apps in a single project. I have had some success in accomplishing this, my projects will build happily so that is quite exciting for me. Now I have come to the situation where in my IntelliJ I am attempting to use the
    actual
    keyword on a class to implement an expect. IntelliJ gives me the warning:
    The feature "multi platform projects" is experimental and should be enabled explicitly
    I have found that in IntelliJ there would be an expectation under :
    Preferences -> 
      Build, Execution, Deployment ->
        Kotlin Compiler ->
          Additional command line parameters:
    To add the flag
    -Xmulti-platform
    I am driving my project settings from gradle and found I can include this block for my subprojects:
    targets.all {
        compilations.all {
            kotlinOptions {
                freeCompilerArgs += '-Xmulti-platform'
            }
        }
    }
    I am still getting the error and it does not seem to have any effect in the IDE understanding that the feature has been adjusted. Am I missing something obvious here? Did I implement my gradle wrong?
    b
    gildor
    6 replies
    Copy to Clipboard