I am trying to change the binaries name generated by the multiplatform plugin for Native targets (for iOS), by I am getting this error:
Cannot create binary debugFramework: binary with such a name already exists
My build.gradle files is with:
// add a platform switching to have an IDE support
final def buildForDevice = project.findProperty('kotlin.native.cocoapods.target') == 'ios_arm'
if (buildForDevice) {
iosArm64('ios64')
iosArm32('ios32')
sourceSets {
ios64Main.dependsOn(iosMain)
ios32Main.dependsOn(iosMain)
}
} else {
iosX64('ios')
}
targets.matching { it.platformType.name == 'native' }.all {
compilations.each {
it.extraOpts('-linker-options', '-lsqlite3')
// specify a custom objective-c prefix/name
// it.extraOpts('-module-name', 'DinnoKt')
}
binaries {
framework {
baseName = ‘MyLibKt’
}
}
}
If I pass a name to the framework, like:
…
binaries {
framework("MyLibKt") {
// disable bitcode embedding for the simulator build
if (!buildForDevice) {
embedBitcode 'bitcode' // for release binaries
}
}
}
This works well, but a new apple framework is produced on build/bin/ios
folder, aside the auto-generated by the kotlin-multuplatform plugin