Maybe I was able to translate, but I’m not so sure...
# gradle
g
Maybe I was able to translate, but I’m not so sure if it is all right:
Copy code
task("copyFramework") {
	val buildType = (project.findProperty("kotlin.build.type") ?: "DEBUG").toString()
	val target = project.findProperty("kotlin.target") ?: "ios"
	dependsOn((kotlin.targets["$target"].compilations["main"] as KotlinNativeCompilation).linkTaskName("FRAMEWORK", buildType))

	doLast {
		val srcFile = (kotlin.targets["$target"].compilations["main"] as KotlinNativeCompilation).getBinary("FRAMEWORK", buildType)
		val targetDir = System.getProperty("configuration.build.dir")
		copy {
			from(srcFile.parent) {
				into(targetDir)
				include("main.framework/**")
				include("main.framework.dSYM")
			}
		}
	}
}
Is this the correct translation?
m
Maybe correct, but ugly. Better rewrite it to something like this, replacing
windowsResources
to
copyFramework
and
tasks.create<Exec>
to
tasks.create<Copy>
https://github.com/msink/hello-libui/blob/824eef8dd2ad81a31a9901a2c4423c8ef55deb78/build.gradle.kts#L30