Closed handstandsam closed 2 years ago
Looked more into this. The recommended way is to apply your config if the KotlinMultiplatformExtension
is non-null.
project.extensions.findByType(
org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension::class.java
)?.apply {
listOf(
iosSimulatorArm64()
).forEach { nativeTarget ->
nativeTarget.binaries.framework {
baseName = "jvm_kmp4free"
}
}
}
I had originally looked at having this be a configuration block like:
kmp4free {
config = {
// CONFIG WOULD HAVE GONE HERE
}
}
This doesn't work though because configuration is determined during project evaluation, but we need this config for evaluation. Therefore, the method first listed is the best approach.
There is currently some hard coded target configurations in this plugin. It would be nice to specify those to pass into the plugin.