Thread
#multiplatform
    t

    thevery

    3 years ago
    With new mpp plugin, how to enable both
    iosArm64
    and
    iosArm32
    in one config? Or probably even all 3 with iosX64.
    ok, solved with
    fromPreset(presets.iosArm64, 'ios64')
            fromPreset(presets.iosArm32, 'ios32')
    +
    ios32Main.dependsOn iosMain
            ios64Main.dependsOn iosMain
    but there should be better way
    f

    fabianterhorst

    3 years ago
    configure([ios_x64Main, ios_arm64Main]) {
        dependsOn(iosMain)
    }
    t

    thevery

    3 years ago
    just slightly better and doesn't work for me anyway
    Liliia

    Liliia

    3 years ago
    As for the names you’ve used above, for
    sourceSets
    configuration, it will be indeed like Fabian said with a little fix:
    configure([ios64Main, ios32Main]) {
        dependsOn iosMain
    }
    t

    thevery

    3 years ago
    configure([ios64Main, ios32Main]) {
                dependsOn iosMain
            }
    Could not get unknown property 'iosMain' for source set ios64Main of type org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSet.
    Liliia

    Liliia

    3 years ago
    Well, I imply that you’ve
    iosMain
    declared among the other sourceSets, at least like this:
    iosMain {}
    . Otherwise, why would Gradle create it 🙂
    Such a declaration doesn’t make the source set platform specific, unless you have a target named
    ios
    , though. But I guess you need
    iosMain
    to be platform-agnostic, so that’s OK
    t

    thevery

    3 years ago
    @Liliia ic, thanks. Though
    [ios32Main, ios64Main, iosSimMain].each {
                it.dependsOn iosMain
            }
    is still easier imo than
    iosMain {}
            configure([ios32Main, ios64Main, iosSimMain]) {
                dependsOn iosMain
            }
    olonho

    olonho

    3 years ago
    this approach will likely break 😞. See https://github.com/JetBrains/kotlin-mpp-example/pull/13
    t

    thevery

    3 years ago
    Yes, and that's why I asked for for better solution on this thread and in PR
    tylerwilson

    tylerwilson

    3 years ago
    any updates on this? i would like to generate a ‘fat’ framework too, but it is not clear from the above where the commands should go. anybody have a working sample online somewhere? thanks!
    t

    thevery

    3 years ago