KT-62745: Set 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO' in CocoaPods integration
This commit is contained in:
committed by
Space Team
parent
1eb6ae4d21
commit
259a2f5ec0
Generated
+1
@@ -2,6 +2,7 @@
|
||||
<dictionary name="Andrey.Yastrebov">
|
||||
<words>
|
||||
<w>sandboxing</w>
|
||||
<w>xcconfig</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
+1
@@ -187,6 +187,7 @@ internal fun Project.registerEmbedAndSignAppleFrameworkTask(framework: Framework
|
||||
"\nTo make the $frameworkTaskName task pass, disable this feature. " +
|
||||
"\nIn your Xcode project, navigate to \"Build Setting\", " +
|
||||
"and under \"Build Options\" set \"User script sandboxing\" (ENABLE_USER_SCRIPT_SANDBOXING) to \"NO\". " +
|
||||
"\nThen, run \"./gradlew --stop\" to stop the Gradle daemon" +
|
||||
"\nFor more information, see documentation: https://jb.gg/ltd9e6"
|
||||
)
|
||||
}
|
||||
|
||||
+14
-4
@@ -123,14 +123,16 @@ abstract class PodspecTask @Inject constructor(private val projectLayout: Projec
|
||||
|
||||
val deploymentTargets = run {
|
||||
listOf(ios, osx, tvos, watchos).map { it.get() }.filter { it.deploymentTarget != null }.joinToString("\n") {
|
||||
if (extraSpecAttributes.get().containsKey("${it.name}.deployment_target")) "" else "| spec.${it.name}.deployment_target = '${it.deploymentTarget}'"
|
||||
if (extraSpecAttributes.get()
|
||||
.containsKey("${it.name}.deployment_target")
|
||||
) "" else "| spec.${it.name}.deployment_target = '${it.deploymentTarget}'"
|
||||
}
|
||||
}
|
||||
|
||||
val dependencies = pods.get().map { pod ->
|
||||
val dependencies = pods.get().joinToString(separator = "\n") { pod ->
|
||||
val versionSuffix = if (pod.version != null) ", '${pod.version}'" else ""
|
||||
"| spec.dependency '${pod.name}'$versionSuffix"
|
||||
}.joinToString(separator = "\n")
|
||||
}
|
||||
|
||||
val frameworkDir = projectLayout.cocoapodsBuildDirs.framework.getFile().relativeTo(outputFile.parentFile)
|
||||
val vendoredFramework = if (publishing.get()) "${frameworkName.get()}.xcframework" else frameworkDir.resolve("${frameworkName.get()}.framework").invariantSeparatorsPath
|
||||
@@ -153,7 +155,14 @@ abstract class PodspecTask @Inject constructor(private val projectLayout: Projec
|
||||
|
||||
val libraries = if (extraSpecAttributes.get().containsKey("libraries")) "" else "| spec.libraries = 'c++'"
|
||||
|
||||
val xcConfig = if (publishing.get() || extraSpecAttributes.get().containsKey("pod_target_xcconfig")) "" else
|
||||
val xcConfig = if (publishing.get() || extraSpecAttributes.get().containsKey("xcconfig")) "" else
|
||||
""" |
|
||||
| spec.xcconfig = {
|
||||
| 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
|
||||
| }
|
||||
""".trimMargin()
|
||||
|
||||
val podXcConfig = if (publishing.get() || extraSpecAttributes.get().containsKey("pod_target_xcconfig")) "" else
|
||||
""" |
|
||||
| spec.pod_target_xcconfig = {
|
||||
| 'KOTLIN_PROJECT_PATH' => '${projectPath.get()}',
|
||||
@@ -203,6 +212,7 @@ abstract class PodspecTask @Inject constructor(private val projectLayout: Projec
|
||||
$dependencies
|
||||
$vendoredFrameworkExistenceCheck
|
||||
$xcConfig
|
||||
$podXcConfig
|
||||
$scriptPhase
|
||||
$customSpec
|
||||
|end
|
||||
|
||||
Reference in New Issue
Block a user