Skip to content

Instantly share code, notes, and snippets.

@jadar
Last active April 15, 2024 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadar/10dc6d102861487b17421112d7a9f358 to your computer and use it in GitHub Desktop.
Save jadar/10dc6d102861487b17421112d7a9f358 to your computer and use it in GitHub Desktop.
KMP Gradle script - Copy `PrivacyInfo.xcprivacy` file into framework
# 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