Last active
April 15, 2024 14:39
-
-
Save jadar/10dc6d102861487b17421112d7a9f358 to your computer and use it in GitHub Desktop.
KMP Gradle script - Copy `PrivacyInfo.xcprivacy` file into framework
This file contains 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
# Add the following to your shared module `build.gradle.kts` | |
# Place your `PrivacyInfo.xcprivacy` file into your shared module directory, along side the `build.gradle.kts`. | |
project.afterEvaluate { | |
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink>().forEach { linkTask -> | |
val frameworkDestinationDir = linkTask.outputFile | |
linkTask.doLast { | |
project.copy { | |
val sharedDir = project.file("PrivacyInfo.xcprivacy") | |
from(sharedDir) | |
into(frameworkDestinationDir.get()) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment