I am trying out kotlin multiplatform and I have the common portion build and tested in Android and working fine but now I am trying to implement the code in iOS to try out. I see the gradle task in my build.gradle for iOS.
// This task attaches native framework built from ios module to Xcode project
// (see iosApp directory). Don't run this task directly,
// Xcode runs this task itself during its build process.
// Before opening the project from iosApp directory in Xcode,
// make sure all Gradle infrastructure exists (gradle.wrapper, gradlew).
task copyFramework {
def buildType = project.findProperty('kotlin.build.type') ?: 'DEBUG'
def target = project.findProperty('kotlin.target') ?: 'ios'
dependsOn kotlin.targets."$target".binaries.getFramework(buildType).linkTask
doLast {
def srcFile = kotlin.targets."$target".binaries.getFramework(buildType).outputFile
def targetDir = getProperty('configuration.build.dir')
copy {
from srcFile.parent
into targetDir
include 'app.framework/**'
include 'app.framework.dSYM'
}
}
}
It says not to run the task directly but according to this guide it says to run it directly. When I run it directly I get an error saying
Execution failed for task ':app:copyFramework'.
Could not get unknown property 'configuration.build.dir' for task ':app:copyFramework' of type org.gradle.api.DefaultTask.
I dont know what I have to do to build this for iOS.
Can anyone help me out here on what to do?