GarouDan
02/09/2019, 7:36 PMkts
mode but I’m having a hard time.
task copyFramework {
def buildType = project.findProperty('kotlin.build.type') ?: 'DEBUG'
def target = project.findProperty('kotlin.target') ?: 'ios'
dependsOn kotlin.targets."$target".compilations.main.linkTaskName('FRAMEWORK', buildType)
doLast {
def srcFile = kotlin.targets."$target".compilations.main.getBinary('FRAMEWORK', buildType)
def targetDir = getProperty('configuration.build.dir')
copy {
from srcFile.parent
into targetDir
include 'app.framework/**'
include 'app.framework.dSYM'
}
}
}
I was trying something like:
task("copyFramework") {
val buildType = project.findProperty("kotlin.build.type") ?: "DEBUG"
val target = project.findProperty("kotlin.target") ?: "ios"
dependsOn(kotlin.targets["$target"].compilations["main"].linkTaskName("FRAMEWORK", buildType))
doLast {
val srcFile = kotlin.targets["$target"].compilations["main"].getBinary("FRAMEWORK", buildType)
val targetDir = System.getProperty("configuration.build.dir")
copy {
from(srcFile.parent) {
into(targetDir)
include("app.framework/**")
include("app.framework.dSYM")
}
}
}
}
but the linkTaskName is not being recognized. Could you help me to translate this task?