• Ferran

    Ferran

    1 year ago
    For creating a multiplatform project we have to create a kotlin multiplatform module in our project. Is there a way to create submodules inside the multiplatform module so that we can apply clean architecture separation within the module, for example having a module for repositories/data and another submodule for usecases
    Ferran
    Tomasz Krakowiak
    +2
    7 replies
    Copy to Clipboard
  • d

    dan.the.man

    1 year ago
    I'm using KMP with Ktor, but when I go to make a network request in Android, I'm gettiing
    java.security.cert.CertificateException: Domain specific configurations require that hostname aware checkServerTrusted(X509Certificate[], String, String) is used
    but I can make the exact same request with retrofit no problem, it's a simple GET and works in a browser/postman etc
    d
    2 replies
    Copy to Clipboard
  • Alex Anisimov

    Alex Anisimov

    1 year ago
    📣📣📣 Attention all Kotlin Multiplatform users! Our users are the best source of information about Kotlin and we continue to rely on their help while making decisions about the future of the technology. Every single change that has been made to Kotlin has been based on feedback from thousands of Kotlin users around the world. Today we want to give you a chance to help create the future of Kotlin Multiplatform! Take part in the first Kotlin Multiplatform user survey, share your thoughts and feedback, and help us make Kotlin Multiplatform even better! As a token of thanks, everyone that participates in this survey will also be entered into a raffle for the chance to win a special prize from the Kotlin team! 🏆 ➡️ https://kotl.in/KMP_survey
    Alex Anisimov
    m
    2 replies
    Copy to Clipboard
  • rsetkus

    rsetkus

    1 year ago
    Hi. Published Kotlin Multiplatform Android library on local maven but when importing library into an app as dependency getting error:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
       > Could not resolve xx.yy.mpp:kommon-android:0.0.1.
         Required by:
             project :app
          > No matching variant of xx.yy.mpp:kommon-android:0.0.1 was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
              - Variant 'android-releaseApiElements' capability xx.yy.mpp:kommon-android:0.0.1 declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
              - Variant 'android-releaseRuntimeElements' capability xx.yy.mpp:kommon-android:0.0.1 declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
              - Variant 'metadata-api' capability xx.yy.mpp:kommon-android:0.0.1:
                  - Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
                  - Other compatible attribute:
                      - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
              - Variant 'metadata-commonMainMetadataElements' capability xx.yy.mpp:kommon-android:0.0.1:
                  - Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
                  - Other compatible attribute:
                      - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
    Feeling it is more
    maven-publish
    plugin issue but since it is KMP project I thought somebody else has faced with the same issue.
    rsetkus
    Big Chungus
    +1
    15 replies
    Copy to Clipboard
  • Patrick Doering

    Patrick Doering

    1 year ago
    Hey is it possible to set up a Jacoco coverage report in a multiplatform project on the jvmTest task? Does anybody have an example?
    Patrick Doering
    d
    +1
    4 replies
    Copy to Clipboard
  • w

    william

    1 year ago
    does anyone know of some swift code gen plugins? i.e. something that allows me to annotate an enum and then it will generate the swift code for the enum and maybe appropriate methods to convert the objc "enum" thing into a swift enum? or used for other purposes? I found https://github.com/outfoxx/swiftpoet which I am curious if people have taken advantage of for iOS interop
    w
    c
    2 replies
    Copy to Clipboard
  • s

    Sebastien Leclerc Lavallee

    1 year ago
    Hey! I wanted to know if it’s possible to set the version ( among other fields ) when generating a podspec file using the gradle task? By default, it outputs:
    spec.version                  = 'unspecified'
    which is not OK for Cocoapods and we need to set a version. I did set the version manually but for some reason, when executing Fastlane to bundle and upload my app, the
    shared:podspec
    task is executed. I don’t exactly where and why it’s executed, I’m still trying to figure it out. But I would prefer to have a way to set it by code inside my gradle file. Thanks 🙂
    s
    Artyom Degtyarev [JB]
    2 replies
    Copy to Clipboard
  • Lukasz Kalnik

    Lukasz Kalnik

    1 year ago
    Hello, I'm looking for a way to bundle and load text files as resources in an Android/iOS multiplatform project.
    Lukasz Kalnik
    John O'Reilly
    2 replies
    Copy to Clipboard
  • Ferran

    Ferran

    1 year ago
    do you know if
    SharedFlow
    is available from
    org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1
    ? if not, which dependency shall I add for the
    commonMain
    sourceset?
    Ferran
    r
    +1
    19 replies
    Copy to Clipboard
  • h

    Hauke Radtki

    1 year ago
    Is there a way to reference an extension function by package? My issue: I want to
    expect
    an extension function that is available on some targets and not on others. E.g.:
    File.readBytes():ByteArray
    is defined in jvm but not on native. So I want to have an actual expression that references the existing extension function (located in
    <http://kotlin.io|kotlin.io>
    ) for jvm and roll my own implementation for native targets.
    h
    ilya.gorbunov
    2 replies
    Copy to Clipboard