Vincent Chen
09/24/2019, 5:51 AMgildor
09/24/2019, 5:54 AMval ios32 = kotlin.iosArm32()
Vincent Chen
09/24/2019, 5:54 AMgildor
09/24/2019, 5:54 AMVincent Chen
09/24/2019, 5:57 AMkotlin {
targets {
val iOSArm64 = iosArm64(targetNameIOSArm64) {
}
val iOSX64 = iosX64(targetNameIOSX64) {
}
}
}
tasks.create("debugFatFramework", FatFrameworkTask::class) {
group = groupNameIOSFatFramework
// The fat framework must have the same base name as the initial frameworks.
baseName = exportFrameworkNameIOS
// The default destination directory is '<build directory>/fat-framework'.
destinationDir = buildDir.resolve("fat-framework/debugFramework")
// Specify the frameworks to be merged.
from(
iOSArm64.binaries.getFramework("DEBUG"), // iOSArm64 can't found
iOSX64.binaries.getFramework("DEBUG") // iOSX64 can't found
)
}
Vincent Chen
09/24/2019, 5:59 AMgildor
09/24/2019, 6:13 AMval iOSArm64 = kotlin.iosArm64(targetNameIOSArm64 { /* some config */ }
val iOSX64 = kotlin.iosX64(targetNameIOSX64) { }
Kris Wong
09/24/2019, 1:40 PMkotlin.
Vincent Chen
09/24/2019, 4:45 PM(kotlin.targets.findByName("iOSArm64") as KotlinNativeTarget).binaries.getFramework("DEBUG"),
Thanks everyone.Kris Wong
09/24/2019, 4:51 PMgildor
09/25/2019, 1:49 AMkotlin.targets.ios.binaries.getFramework(“DEBUG”)Will not work on Kotlin DSL, because
kotlin.targets
is not exposed as propery, only as configuration blockgildor
09/25/2019, 1:50 AM(kotlin.targets.findByName(“iOSArm64”) as KotlinNativeTarget).binaries.getFramework(“DEBUG”)I don’t understand why you want to get this configuration by name, if you can just save it to local variable and reuse