Is there an easy way to use the same name for mult...
# multiplatform
s
Is there an easy way to use the same name for multiple targets? Like the
ios()
target bundles
iosArm64
&
iosX64
I want the architectures iosArm64(), iosSimulatorArm64(), macosX64() and macosArm64() in a common
iosMain
&
iosTest
source set. But everything the
ios()
method calls is private and I would basicly copy everything to make it work that way. Feels wrong. What is the intended way to solve that?
โœ… 1
b
You can create your own sourcets and connect them together. Here's an example https://github.com/mpetuska/klip/blob/master/buildSrc/src/main/kotlin/plugin.library-mpp.gradle.kts#L62
๐Ÿ™ 1
s
Thank you! ๐Ÿ™‚
b
Lots of other goodies for kmp there. Have a look around when you have the time ;)
๐Ÿ‘ 1
You'll need to enable HMPP for dependencies to work properly, copy over relevant props from gradle.properties in that repo too.
๐Ÿ™ 1
s
Ok, I try ๐Ÿ™‚
k
s
@Konstantin Tskhovrebov So nice you updated the production sample. 4 month ago this was actually my starting point with my project. I think this template is way better as the magic
ios()
target because it most clearly showcases how to add and remove architectures. Please keep it that way in the future even if the
ios()
target may change. It's way easier to get started.
๐Ÿ‘ 1