Created
July 6, 2020 06:56
-
-
Save romainbsl/00c8b0ce37e7cd0e87e18e4277ea1c85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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