https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
t

thevery

10/01/2018, 12:48 PM
With new mpp plugin, how to enable both
iosArm64
and
iosArm32
in one config? Or probably even all 3 with iosX64.
ok, solved with
Copy code
fromPreset(presets.iosArm64, 'ios64')
        fromPreset(presets.iosArm32, 'ios32')
+
Copy code
ios32Main.dependsOn iosMain
        ios64Main.dependsOn iosMain
but there should be better way
f

fabianterhorst

10/01/2018, 1:24 PM
Copy code
configure([ios_x64Main, ios_arm64Main]) {
    dependsOn(iosMain)
}
t

thevery

10/01/2018, 1:43 PM
just slightly better and doesn't work for me anyway
l

Liliia

10/01/2018, 3:38 PM
As for the names you’ve used above, for
sourceSets
configuration, it will be indeed like Fabian said with a little fix:
Copy code
configure([ios64Main, ios32Main]) {
    dependsOn iosMain
}
t

thevery

10/01/2018, 4:03 PM
Copy code
configure([ios64Main, ios32Main]) {
            dependsOn iosMain
        }
Could not get unknown property 'iosMain' for source set ios64Main of type org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSet.
l

Liliia

10/01/2018, 6:04 PM
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

10/01/2018, 7:53 PM
@Liliia ic, thanks. Though
Copy code
[ios32Main, ios64Main, iosSimMain].each {
            it.dependsOn iosMain
        }
is still easier imo than
Copy code
iosMain {}
        configure([ios32Main, ios64Main, iosSimMain]) {
            dependsOn iosMain
        }
o

olonho

10/02/2018, 7:16 AM
this approach will likely break 😞. See https://github.com/JetBrains/kotlin-mpp-example/pull/13
t

thevery

10/02/2018, 8:10 AM
Yes, and that's why I asked for for better solution on this thread and in PR
t

tylerwilson

10/19/2018, 4:35 PM
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!