• d

    dwursteisen

    2 years ago
    Hello all! I’m trying to implement a lib which run on the JVM, JS and Android but with different dependencies for each platform. I got a lot of issues to define specific android dependencies without having any error from Gradle.  When I’m trying to add a dependency to Android, I got an error saying my compilation with the name «release » (I tried with « main » and « test » or name given by android(“android”).compilations) wasn’t found. 
    android("android").compilations["release"].defaultSourceSet { ... }
    I end up with this solution: iterate over all compilations and if the name match the one I expect, change dependencies. Is anyone already encounter this kind of issues? How did you fix it? ``````
    d
    Kris Wong
    5 replies
    Copy to Clipboard
  • phldavies

    phldavies

    2 years ago
    With gradle, when using
    kotlin("multiplatform")
    with
    id("com.android.library")
    , what's the best approach to configure the kotlin
    jvmTarget
    ? I can't seem to use
    kotlinOptions {}
    in the
    android{}
    block.
    phldavies
    Kris Wong
    2 replies
    Copy to Clipboard
  • j

    Janelle Fullen

    2 years ago
    Hi, I am trying out 1.3.70 but don't see the browserProductionWebpack task in my IntelliJ Gradle menu. I have updated my IntelliJ Kotlin plugin, and bumped the version of Kotlin I'm using for my gradle plugin to 1.3.70. I am also using the multiplatform plugin. Not sure what I'm doing wrong.
    j
    j
    +1
    15 replies
    Copy to Clipboard
  • r

    rnentjes

    2 years ago
    Is is correct that the kotlin { target { browser{} } } thing (version 1.3.70) doesn't work with multiplatform?
    r
    Ilya Goncharov [JB]
    2 replies
    Copy to Clipboard
  • e

    Egor Okhterov

    2 years ago
    Still doesn't work in
    1.3.70
    e
    Big Chungus
    +2
    42 replies
    Copy to Clipboard
  • a

    addamsson

    2 years ago
    Hi there! I've added the
    browser
    as a target for my MPP project and I'm getting this error:
    04 03 2020 16:26:34.829:ERROR [launcher]: No binary for ChromeHeadless browser on your platform.
    
      Please, set "CHROME_BIN" env variable.
    What can I do to fix this? I tried to add chrome as the docs states:
    browser {
        testTask {
            useKarma {
                useChrome()
            }
        }
    }
    but I get the same error. How can I make my builds run out of the box (without having to set env variables)?
    a
    Eivind Nilsbakken
    +1
    20 replies
    Copy to Clipboard
  • b

    Brandon Saunders

    2 years ago
    is there a way to get jsBrowserProductionWebpack working with commonJS as the librarytarget? Our project originally used nodejs as one of our targets but switched to js to get the DCE benefit but the output now isn't immediately consummable. And it doesn't appear like our default webpack config is being used to determine the output
    b
    Ilya Goncharov [JB]
    +2
    12 replies
    Copy to Clipboard
  • Nick Halase

    Nick Halase

    2 years ago
    PSA: If you're struggling to understand why your project stopped providing good intellisense for native, it might be because you accidentally installed the 1.3.70 Kotlin plugin. That is all.
    Nick Halase
    russhwolf
    +1
    7 replies
    Copy to Clipboard
  • Kurt Renzo Acosta

    Kurt Renzo Acosta

    2 years ago
    Has anyone encountered and resolved this error: `Class
    MyClass
    has several compatible actual declarations in modules module_iosX64Main, module_iosMain,Class
    MyClass
    has several compatible actual declarations in modules module_iosArm64Main, module_iosMain`? I'm trying to use the target shortcuts for iOS and my expect/actual declarations are having this error. Before I was using a switching mechanism between the device and simulator like this:
    val iOSTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
            if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
                ::iosArm64
            else
                ::iosX64
    
    iOSTarget("ios") {
        // config...
    }
    Kurt Renzo Acosta
    russhwolf
    +1
    22 replies
    Copy to Clipboard
  • tylerwilson

    tylerwilson

    2 years ago
    Working on some common code shared between Android and iOS, using a sealed class. Looking at using sealedSubclasses to enumerate cases. I see that this method is only available on JVM and JS. Do we think this might/could be implemented for iOS one day? I understand it may need more reflection support that may not be possible, but curious whether it might be in the 1.4 roadmap…
    tylerwilson
    ankushg
    2 replies
    Copy to Clipboard