Skip to content

Instantly share code, notes, and snippets.

@romainbsl
Created July 6, 2020 06:56
Show Gist options
  • Select an option

  • Save romainbsl/00c8b0ce37e7cd0e87e18e4277ea1c85 to your computer and use it in GitHub Desktop.

Select an option

Save romainbsl/00c8b0ce37e7cd0e87e18e4277ea1c85 to your computer and use it in GitHub Desktop.
val packForXcode by tasks.creating(Sync::class) {
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val framework = kotlin.targets
.getByName<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget>("ios")
.binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(framework.linkTask)
val targetDir = File(buildDir, "xcode-frameworks")
from({ framework.outputDirectory })
into(targetDir)
}
tasks.getByName("build").dependsOn(packForXcode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment