is there any way to specify that one source set de...
# multiplatform
k
is there any way to specify that one source set depends on another (i.e., iosArm64Main depends on iosMain), but add a dependency to iosMain that is not included in iosArm64Main?
d
Why would you want to do this?
k
a library I am using makes things difficult because you have to specify each iOS target dependency individually, instead of one common iOS dependency
d
Ah, so you want to apply all of them in the
iosMain
and have the specific sourceSets pick the appropriate ones.
k
iosMain needs iOS X64 artifact, and iosArm64Main needs the Arm64 artifact
as to how I accomplish that, i'm indifferent 🙂
d
Oh.
iosMain
is a platform specific source set?
k
yes - X64
otherwise IDEA is completely broken when editing files in that source set
d
You can probably achieve what you want with a for loop in gradle and some name mangling.
What's do the dependency names look like?
k
Copy code
suparnatural-kotlin-multiplatform:fs-iosarm64:1.0.8
d
You can apply the dependency directly to the
compilation
as supposed to the sourceSet.
Copy code
compilations {
    "main" {
        dependencies {
            // Deps here shouldn't infect the sourceSet.
            implementation("suparnatural-kotlin-multiplatform:fs-iosarm64:1.0.8")
        }
    }
}
k
oh that's interesting
w00t! that worked. cheers!
👍🏼 1
I understand JB is working on this issue so hopefully this workaround won't be necessary for too much longer