• a

    alec

    3 years ago
  • a

    alec

    3 years ago
    it has to apply for the entire build of that project
    a
    1 replies
    Copy to Clipboard
  • a

    alec

    3 years ago
  • bdeg

    bdeg

    3 years ago
    is there a way to achieve this:
    //For ios target (emulator or real device)
            final def iosTarget = System.getenv("SDK_NAME")?.startsWith("iphoneos") ? presets.iosArm64 : presets.iosX64
            fromPreset(iosTarget, 'ios') {
                compilations.main.outputKinds('FRAMEWORK')
            }
    in the new 1.3.20 mpp plugin ? i tried: def buildForDevice = project.findProperty("device")?.toBoolean() ?: false (buildForDevice) ? iosArm64("ios") : iosX64("ios") targets.compilations["ios"] { compilations.main.outputKinds("framework") binaries { framework { // Disable bitcode embedding for the simulator build. if (!buildForDevice) { embedBitcode("disable") } } } } also:
    def buildForDevice = project.findProperty("device")?.toBoolean() ?: false
        def ios = (buildForDevice) ? iosArm64("ios") : iosX64("ios")
        ios {
            compilations.main.outputKinds("framework")
    
            binaries {
                framework {
                    // Disable bitcode embedding for the simulator build.
                    if (!buildForDevice) {
                        embedBitcode("disable")
                    }
                }
            }
        }
    bdeg
    Dominaezzz
    +1
    24 replies
    Copy to Clipboard
  • r

    ribesg

    3 years ago
    What makes
    compilations
    of an
    android
    target appear?
    r
    Dominaezzz
    7 replies
    Copy to Clipboard
  • natpryce

    natpryce

    3 years ago
    Does the kotlin-multiplatform plugin create standard source-sets that are dependencies of all native targets? E.g. it creates the standard commonMain and commonTest source sets, which are dependencies of all targets, which can contain code that uses kotlin-stdlib-common. Is there equivalent for native targets, which relies on stdlib features common to all native platforms? (is that even a thing?)
    natpryce
    i
    +2
    7 replies
    Copy to Clipboard
  • alexfacciorusso

    alexfacciorusso

    3 years ago
    hey guys, silly question: what's the best way of formatting a Float/Double to String with a given number of decimals in Kotlin common?
    alexfacciorusso
    Ashley Figueira
    3 replies
    Copy to Clipboard
  • coolcat

    coolcat

    3 years ago
    Hi. Has anybody succeeded in producing an iOS framework containing both arm32 and arm64 binaries? Currently my project is set up using the build script recommended in the Multiplatform tutorial (https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html) but this produces only a 64-bit framework.
    coolcat
    1 replies
    Copy to Clipboard
  • r

    ribesg

    3 years ago
    I still didn’t find a solution to this, my
    android
    target has no
    compilation
    r
    russhwolf
    +1
    6 replies
    Copy to Clipboard
  • natpryce

    natpryce

    3 years ago
    How does one diagnose the cause of an “Invalid module” build error? When compiling tests for the macosX64 target, my build fails with an enormous error message that includes what looks like LLVM bitcode of the compiled module, and eventually ends with:
    * Compiler version info: Konan: 1.1.1 / Kotlin: 1.3.20
     * Output kind: PROGRAM
    
    exception: java.lang.Error: Invalid module
            at org.jetbrains.kotlin.backend.konan.llvm.IrToBitcodeKt.verifyModule(IrToBitcode.kt:179)
            at org.jetbrains.kotlin.backend.konan.llvm.IrToBitcodeKt.verifyModule$default(IrToBitcode.kt:170)
    What can I do to resolve the error?
    natpryce
    s
    9 replies
    Copy to Clipboard