GarouDan
01/24/2020, 9:57 AMxcode-compat
, and the method that I’d like to expose is setupTask
(which is available here: https://github.com/Kotlin/xcode-compat/blob/6633fe0696c38c9eee2f789164b8b945910fdc13/xcode-compat/src/main/kotlin/org/jetbrains/kotlin/xcodecompat/XcodeCompatPlugin.kt#L27)
Please also note that this method will depend on other private ones.
I tested copying and pasting the plugin locally and then applying it, it works after that, but I don’t know if I can do that without forking the plugin. Can we?gian
01/24/2020, 10:16 AMGarouDan
01/24/2020, 10:45 AMgian
01/24/2020, 10:47 AMgian
01/24/2020, 10:47 AMgian
01/24/2020, 10:48 AMfun Abc.extension()
is the same as fun extension(abc: Abc)
GarouDan
01/24/2020, 8:13 PMfun KotlinXcodeExtension.setupFramework(kotlinNativeTarget: KotlinNativeTarget?) {
}
fun KotlinXcodeExtension.setupTask(nativeBinary: NativeBinary) {
val `class` = KotlinXcodeExtension::class.java
val method = `class`.getDeclaredMethod("setupTask", NativeBinary::class.java)
method.setAccessible(true)
method.invoke(this, nativeBinary)
}
so I can use something like
xcode {
setupFramework (
iosX64("myApp") {
binaries {
framework {
baseName = "myFramework"
setupTask(this)
}
}
}
)
}
The usual way to use this plugin is like:
xcode {
setupFramework (
binaries {
framework {
baseName = "myFramework"
}
}
)
}