• m

    markusa

    3 years ago
    Is there a way to exclude sources by pattern with the multiplatform plugin? What I did before:
    sourceSets {
        main {
            kotlin {
                srcDir 'src/main/kotlin'
    
                if(isAndroid) {
                    exclude '**/*Backtick*'
                }
            }
        }
    now I have
    kotlin {
        jvm()
        jvm('android')
        jvmMain {...}
        jvmTest {...}
        androidMain {
            kotlin.srcDirs += jvmMain.kotlin.srcDirs // exclude **/*Backtick*?
       }
       androidTest {
            kotlin.srcDirs += jvmTest.kotlin.srcDirs // exclude **/*Backtick*?
       }
    }
    m
    1 replies
    Copy to Clipboard
  • m

    markusa

    3 years ago
    I'm btw. currently moving Kluent from an old manual Gradle approach (supporting all platforms aside from native) to the multiplatform plugin, to get support for native in. If you're interested in having a look or share feedback: https://github.com/MarkusAmshove/Kluent/pull/148
    m
    olonho
    2 replies
    Copy to Clipboard
  • altavir

    altavir

    3 years ago
    @udalov, I've hit a wall with https://youtrack.jetbrains.com/issue/KT-28927. In a single project it could be resolved by clean build, but in separate projects, I can't find a way to fix it. Is there a workaround until 1.3.50?
    altavir
    udalov
    3 replies
    Copy to Clipboard
  • spierce7

    spierce7

    3 years ago
    Is there a multiplatform Float or Double to String writer? I need a way to chop off the
    x.0
    at the end when there is no decimal data.
    spierce7
    1 replies
    Copy to Clipboard
  • j

    JoakimForslund

    3 years ago
    Wanted to be able to directly run my jvm target in my Multiplatform setup. Using the following kotlin gradle script i'm trying to launch the
    Application.kt
    file placed inside my package called box:
    tasks.create("run", JavaExec::class) {
        dependsOn("jvmMainClasses", "jvmJar")
        main = "box.ApplicationKt"
        classpath = files(
            kotlin.targets["jvm"].compilations["main"].output.allOutputs.files,
            configurations["jvmRuntimeClasspath"]
        )
        args = listOf()
    }
    However, this results in :
    Error: Could not find or load main class box.ApplicationKt
    Anyone have any pointers to run a jvm target?
    j
    gildor
    6 replies
    Copy to Clipboard
  • a

    addamsson

    3 years ago
    I'm working on some code in a
    common
    module (
    commonMain
    ) and I have my tests in
    commonTest
    . When I run my tests with Coverage in IDEA I get
    No coverage results
    . How can I configure IDEA to do Coverage for
    common
    code?
    a
    a
    3 replies
    Copy to Clipboard
  • kpgalligan

    kpgalligan

    3 years ago
    Working on client leads. Have some questions for the folks out there using KMP in production (for native mobile)
    kpgalligan
    n
    +1
    9 replies
    Copy to Clipboard
  • n

    Nikolai

    3 years ago
    Hi, everyone I have a question about multiplatform project structure. In IDEA we have two main patterns mobile shared library and mobile android/ios. For library I understand it. We have app.framework for iOS and jar file for android. As for Mobile Android/iOS pattern I don't have clear picture. We still have framework for iOS, but how common module code applied to android? I saw in build.gradle that we use task
    kotlin {
        android("android")
        ....
    }
    But I don't understand what exactly it doing, what means "android" as parameter, what we have as output? And as result how common module code goes to android part? P.S. Also, is where any place I can found docs to understand that closures have this plugin (kotlin-multiplatform), plugin tasks, what they do and how they works?
    n
    r
    +1
    12 replies
    Copy to Clipboard
  • r

    ribesg

    3 years ago
    I’ve been publishing both
    -android
    and
    -android-debug
    variants of my kmp libs until now because I never managed to force a kmp library B to use the kmp library A’s
    -android
    release in its
    -android-debug
    build. Now I’m making another lib and I feel like I should stop publishing debug builds. Anyone encounter this problem and worked around it?
    r
    russhwolf
    3 replies
    Copy to Clipboard
  • d

    darkmoon_uk

    3 years ago
    Here's an up-to-date :kotlin:Multi-Platform Template for all:https://github.com/chris-hatton/kotlin-multiplatform-template Using newest Multi-Platform plugin to compile for:⚙️ Ktor-based Server :android: Android Mobile/Tablet📺 Android TV🍏 iOS Mobile/Tablet:java: JavaFX Desktop MVP Architecture is favoured 👌 Coroutines and Serialization are set-up Shared library exists between Server and Client to share Models 🤝 Another shared library across Clients to share Presenters 💁‍♂️ Android has a final shared library for Views between Mobile & TV I would like to add an experimental Kotlin/WASM client soon. All welcome to fork/use, and especially welcome to suggest improvements 🙂
    d
    r
    +1
    3 replies
    Copy to Clipboard