is there a way to remove binaries? I tried ```kotl...
# kotlin-native
j
is there a way to remove binaries? I tried
Copy code
kotlin {
  targets.withType(KotlinNativeTarget) {
    binaries.removeAll { it.buildType == NativeBuildType.RELEASE }
  }
}
but the tasks for those still exist
r
I'm not sure why filtering doesn't work, but there is a
buildTypes
argument you can pass to
binaries.framework()
to only get the type you want. I don't know what it looks like from Groovy but in Kotlin you can do
Copy code
binaries.framework(buildTypes = listOf(NativeBuildType.DEBUG))
j
So I believe that would work normally, but i'm using the cocoapods plugin which I think is the one adding the existing two.
r
ah yeah that will make it harder then.
j
I can disable the link task for each binary for now
the fat task isn't in the binaries, so when i disable the binary link tasks the fat one fails ­čś×
this is getting a little too hacky for my taste
although, on the other hand, these tasks are SOOOO slow
r
Maybe throw up a youtrack ticket to make the cocoapods plugin expose the config you need. Then you can convince yourself the hackiness is temporary
I've always hated how the framework block the plugin exposes doesn't have all the same options as the framework block inside binaries.
j
Yeah I'll file it. Not sure how common my use case is. Either way, my hacks are working
Copy code
$ gw clean assemble --console=plain 2> /dev/null | \grep :link
> Task :samples:counter:ios:shared:linkPodDebugFrameworkIosArm64
> Task :samples:counter:ios:shared:linkPodDebugFrameworkIosX64
> Task :samples:counter:ios:shared:linkPodDebugFrameworkIosFat
> Task :samples:counter:ios:shared:linkPodDebugFrameworkIosSimulatorArm64
> Task :samples:counter:ios:shared:linkPodReleaseFrameworkIosArm64 SKIPPED
> Task :samples:counter:ios:shared:linkPodReleaseFrameworkIosX64 SKIPPED
> Task :samples:counter:ios:shared:linkPodReleaseFrameworkIosFat SKIPPED
> Task :samples:counter:ios:shared:linkPodReleaseFrameworkIosSimulatorArm64 SKIPPED
> Task :samples:emoji-search:ios:shared:linkPodDebugFrameworkIosArm64
> Task :samples:emoji-search:ios:shared:linkPodDebugFrameworkIosX64
> Task :samples:emoji-search:ios:shared:linkPodDebugFrameworkIosFat
> Task :samples:emoji-search:ios:shared:linkPodDebugFrameworkIosSimulatorArm64
> Task :samples:emoji-search:ios:shared:linkPodReleaseFrameworkIosArm64 SKIPPED
> Task :samples:emoji-search:ios:shared:linkPodReleaseFrameworkIosX64 SKIPPED
> Task :samples:emoji-search:ios:shared:linkPodReleaseFrameworkIosFat SKIPPED
> Task :samples:emoji-search:ios:shared:linkPodReleaseFrameworkIosSimulatorArm64 SKIPPED